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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue May 14 15:26:43 UTC 2019


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



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: merged
Gerrit-Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5
Gerrit-Change-Number: 14044
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190514/08a9b380/attachment.html>


More information about the gerrit-log mailing list