laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/27820 )
Change subject: libosmo-mgcp: e1: fix memleaks in e1_recv_cb() ......................................................................
libosmo-mgcp: e1: fix memleaks in e1_recv_cb()
Change-Id: I4be9e6d09b34e792f24c9f09d19dce15b9dfbe3f Fixes: OS#5533 --- M src/libosmo-mgcp/mgcp_e1.c 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/libosmo-mgcp/mgcp_e1.c b/src/libosmo-mgcp/mgcp_e1.c index e88b8c5..9a6efe2 100644 --- a/src/libosmo-mgcp/mgcp_e1.c +++ b/src/libosmo-mgcp/mgcp_e1.c @@ -338,6 +338,7 @@ trunk = mgcp_trunk_by_line_num(cfg, ts->line->num); if (!trunk) { LOGP(DE1, LOGL_ERROR, "E1-RX: unable to find a trunk for E1-line %u!\n", ts->line->num); + msgb_free(msg); return; }
@@ -359,6 +360,9 @@
/* Trigger sending of pending E1 traffic */ e1_send(ts, trunk); + + /* e1inp_rx_ts() does not free() msgb */ + msgb_free(msg); }
static int e1_init(struct mgcp_trunk *trunk, uint8_t ts_nr)