Change in libosmo-sccp[master]: fix memleak in m3ua_rx_xfer()

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Jul 11 03:23:27 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/9958


Change subject: fix memleak in m3ua_rx_xfer()
......................................................................

fix memleak in m3ua_rx_xfer()

Change-Id: I6211c8809eefeb94289c4c497553561b043ee619
---
M src/m3ua.c
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/58/9958/1

diff --git a/src/m3ua.c b/src/m3ua.c
index f1fe3f1..06ccd6e 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -534,6 +534,7 @@
 
 static int m3ua_rx_xfer(struct osmo_ss7_asp *asp, struct xua_msg *xua)
 {
+	int rc;
 	uint32_t rctx = xua_msg_get_u32(xua, M3UA_IEI_ROUTE_CTX);
 	struct m3ua_data_hdr *dh;
 	struct osmo_ss7_as *as;
@@ -583,7 +584,9 @@
 	 * routing context on the outbound side */
 	xua_msg_free_tag(xua, M3UA_IEI_ROUTE_CTX);
 
-	return m3ua_hmdc_rx_from_l2(asp->inst, xua);
+	rc = m3ua_hmdc_rx_from_l2(asp->inst, xua);
+	xua_msg_free(xua);
+	return rc;
 }
 
 static int m3ua_rx_mgmt_err(struct osmo_ss7_asp *asp, struct xua_msg *xua)

-- 
To view, visit https://gerrit.osmocom.org/9958
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6211c8809eefeb94289c4c497553561b043ee619
Gerrit-Change-Number: 9958
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180711/3b4d198d/attachment.htm>


More information about the gerrit-log mailing list