Change in osmo-msc[master]: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging()

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue May 14 14:42:31 UTC 2019


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14044


Change subject: libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging()
......................................................................

libmsc/ran_peer.c: fix msgb memleaks in ran_peer_down_paging()

Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5
---
M src/libmsc/ran_peer.c
1 file changed, 6 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/44/14044/1

diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c
index 40040a2..a77cb89 100644
--- a/src/libmsc/ran_peer.c
+++ b/src/libmsc/ran_peer.c
@@ -657,7 +657,13 @@
 		LOG_RAN_PEER_CAT(rp, DPAG, LOGL_ERROR,
 				 "Paging for %s matched this RAN peer, but emitting a Paging failed\n",
 				 gsm0808_cell_id_name(page_id));
+		msgb_free(l2);
 		return 0;
 	}
+
+	/* The RAN_PEER_EV_MSG_DOWN_CL handler calls sccp_ran_down_l2_cl(),
+	 * which doesn't free msgb. We have to do this ourselves. */
+	msgb_free(l2);
+
 	return 1;
 }

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5
Gerrit-Change-Number: 14044
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190514/0b6ceb5c/attachment.html>


More information about the gerrit-log mailing list