Change in libosmo-abis[master]: ipaccess: Drop e1inp_line reference in ipacess_drop()

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:31 UTC 2020


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

Change subject: ipaccess: Drop e1inp_line reference in ipacess_drop()
......................................................................

ipaccess: Drop e1inp_line reference in ipacess_drop()

the bfd->data handles a reference to the e1np_line (obtained through
e1inp_line_get() during bfd setup), so remember to drop it under this
condition.

Related: OS#4624
Change-Id: I418064df04872befe2e936e21768b6ea01263120
---
M src/input/ipaccess.c
1 file changed, 7 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 5d17839..08b34a4 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -92,6 +92,13 @@
 		osmo_fd_unregister(bfd);
 		close(bfd->fd);
 		bfd->fd = -1;
+		/* This is BSC code, ipaccess_drop() is only called for
+		   accepted() sockets, hence the bfd holds a reference to
+		   e1inp_line in ->data that needs to be released */
+		OSMO_ASSERT(bfd->data == line);
+		bfd->data = NULL;
+		e1inp_line_put2(line, "ipa_bfd");
+
 		ret = -ENOENT;
 	}
 

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

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I418064df04872befe2e936e21768b6ea01263120
Gerrit-Change-Number: 19257
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/805c2c88/attachment.htm>


More information about the gerrit-log mailing list