Change in libosmo-abis[master]: ipaccess: Set bfd->data to NULL before releasing its reference

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jul 20 15:27:32 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/19259 )

Change subject: ipaccess: Set bfd->data to NULL before releasing its reference
......................................................................

ipaccess: Set bfd->data to NULL before releasing its reference

Since the reference is dropped, make sure no one accesses it through
that pointer anymore. It must be done before calling the put() method,
otherwise it may already be released when put() returns.

Change-Id: Ic3f261b2a995efcbc8eece9669ee3ae63af7b5c0
---
M src/input/ipaccess.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve



diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 4d55e71..3ff59f4 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -661,6 +661,7 @@
 err_line:
 	close(bfd->fd);
 	bfd->fd = -1;
+	bfd->data = NULL;
 	e1inp_line_put2(line, "ipa_bfd");
 	return ret;
 }
@@ -711,6 +712,7 @@
 err_line:
 	close(bfd->fd);
 	bfd->fd = -1;
+	bfd->data = NULL;
 	e1inp_line_put2(line, "ipa_bfd");
 	return ret;
 }

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/19259
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic3f261b2a995efcbc8eece9669ee3ae63af7b5c0
Gerrit-Change-Number: 19259
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200720/b25d64bd/attachment.htm>


More information about the gerrit-log mailing list