Change in libosmo-netif[master]: src/stream.c: Don't leak socket during SCTP_EVENTS getsockopt

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Jun 3 08:32:29 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/18639 )


Change subject: src/stream.c: Don't leak socket during SCTP_EVENTS getsockopt
......................................................................

src/stream.c: Don't leak socket during SCTP_EVENTS getsockopt

In Commit Icc49f347cdc0bb77a5c0e230597d662ac35b4acc I forgot to
close the socket :/

Change-Id: I384c61dac0eac8ad999ff0d62350c2fcf3e57ea9
---
M src/stream.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/39/18639/1

diff --git a/src/stream.c b/src/stream.c
index 44ac1b4..9e5d805 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -103,6 +103,7 @@
 		return sd;
 
 	rc = getsockopt(sd, IPPROTO_SCTP, SCTP_EVENTS, buf, &buf_len);
+	close(sd);
 	if (rc < 0)
 		return rc;
 

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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I384c61dac0eac8ad999ff0d62350c2fcf3e57ea9
Gerrit-Change-Number: 18639
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200603/93cb7467/attachment.htm>


More information about the gerrit-log mailing list