neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31009 )
Change subject: fix msgb leak for RANAP RAB Ass. Req. ......................................................................
fix msgb leak for RANAP RAB Ass. Req.
Fix leaked msgb introduced by the MGW support recently added, and from there copied to the UPF support added after that.
Fixes leaked "RANAP Tx" msgb, one per RAB Assignment that involves an MGW or UPF proxying of user data.
Related: SYS#6297 Change-Id: Ie30e880301346ffca72f98f8c467e56d622fb03f --- M src/osmo-hnbgw/mgw_fsm.c M src/osmo-hnbgw/ps_rab_ass_fsm.c 2 files changed, 2 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, approved
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c index f09300e..764e9a7 100644 --- a/src/osmo-hnbgw/mgw_fsm.c +++ b/src/osmo-hnbgw/mgw_fsm.c @@ -256,6 +256,7 @@
LOGPFSML(fi, LOGL_DEBUG, "forwarding modified RAB-AssignmentRequest to HNB\n"); rua_tx_dt(map->hnb_ctx, map->is_ps, map->rua_ctx_id, msg->data, msg->len); + msgb_free(msg); }
static void mgw_fsm_assign(struct osmo_fsm_inst *fi, uint32_t event, void *data) diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c index b298e45..e676c2c 100644 --- a/src/osmo-hnbgw/ps_rab_ass_fsm.c +++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c @@ -352,6 +352,7 @@ return; } rua_tx_dt(rab_ass->map->hnb_ctx, rab_ass->map->is_ps, rab_ass->map->rua_ctx_id, msg->data, msg->len); + msgb_free(msg); /* The request message has been forwarded. The response will be handled by a new FSM instance. * We are done. */ osmo_fsm_inst_term(rab_ass->fi, OSMO_FSM_TERM_REGULAR, NULL);