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.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26031 )
Change subject: hnb-test: Fix memleak in hnb_read_cb
......................................................................
hnb-test: Fix memleak in hnb_read_cb
Change-Id: I6ecbce6aab11e1382ff9f71d901e1c6ac145f835
---
M src/tests/hnb-test.c
1 file changed, 6 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/31/26031/1
diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c
index 02af4d9..2c73fed 100644
--- a/src/tests/hnb-test.c
+++ b/src/tests/hnb-test.c
@@ -583,22 +583,22 @@
/* FIXME: clean up after disappeared HNB */
close(fd->fd);
osmo_fd_unregister(fd);
- return rc;
+ goto free_ret;
} else if (rc == 0) {
LOGP(DMAIN, LOGL_INFO, "Connection to HNB closed\n");
close(fd->fd);
osmo_fd_unregister(fd);
fd->fd = -1;
-
- return -1;
+ rc = -1;
+ goto free_ret;
} else {
msgb_put(msg, rc);
}
if (flags & MSG_NOTIFICATION) {
LOGP(DMAIN, LOGL_DEBUG, "Ignoring SCTP notification\n");
- msgb_free(msg);
- return 0;
+ rc = 0;
+ goto free_ret;
}
sinfo.sinfo_ppid = ntohl(sinfo.sinfo_ppid);
@@ -626,6 +626,7 @@
break;
}
+free_ret:
msgb_free(msg);
return rc;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26031
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I6ecbce6aab11e1382ff9f71d901e1c6ac145f835
Gerrit-Change-Number: 26031
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211029/8b14b1c9/attachment.htm>