From 37169067b7b5a03d824cf9e2c59418953eeca5d4 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 11 Jul 2018 02:29:34 +0200 Subject: fix memleak in ipa_rx_msg_sccp After m3ua_xfer_from_data() has copied the msgb data, we need to free the msgb. Change-Id: I2263751c0aa3ae32455847c7622af8be0a1e7802 --- src/ipa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ipa.c b/src/ipa.c index 0e6f683..e15b1d8 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -258,6 +258,7 @@ static int ipa_rx_msg_sccp(struct osmo_ss7_asp *asp, struct msgb *msg) data_hdr.dpc = osmo_htonl(dpc); /* Create M3UA message in XUA structure */ xua = m3ua_xfer_from_data(&data_hdr, msgb_l2(msg), msgb_l2len(msg)); + msgb_free(msg); /* Update xua->mtp with values from data_hdr */ m3ua_dh_to_xfer_param(&xua->mtp, &data_hdr); -- cgit v1.2.3