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

Change-Id: I1e76b5eab7cfa091375bd9c76d8dcdec8d16ffe5
This commit is contained in:
Vadim Yanitskiy 2019-05-14 21:41:06 +07:00
parent 762bb042ec
commit ede95d18b3
1 changed files with 6 additions and 0 deletions

View File

@ -657,7 +657,13 @@ page_it:
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;
}