Change in libosmo-abis[master]: ipaccess_recvmsg: Clean up release steps upon error condition

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/+/19260 )

Change subject: ipaccess_recvmsg: Clean up release steps upon error condition
......................................................................

ipaccess_recvmsg: Clean up release steps upon error condition

Related: OS#4624
Change-Id: I47a3e477d6861620a741193d3d3d3e286836fd44
---
M src/input/ipaccess.c
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 3ff59f4..8a7142d 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -330,12 +330,15 @@
 	}
 	return 0;
 err:
-	osmo_fd_unregister(bfd);
 	if (bfd->fd != -1) {
+		osmo_fd_unregister(bfd);
 		close(bfd->fd);
 		bfd->fd = -1;
+		/* This is a BSC accepted socket, bfd->data holds a reference to line, drop it */
+		OSMO_ASSERT(bfd->data == line);
+		bfd->data = NULL;
+		e1inp_line_put2(line, "ipa_bfd");
 	}
-	e1inp_line_put2(line, "ipa_bfd");
 	return -1;
 }
 

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

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I47a3e477d6861620a741193d3d3d3e286836fd44
Gerrit-Change-Number: 19260
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
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/8f1eb4b7/attachment.htm>


More information about the gerrit-log mailing list