diff options
author | Eric <ewild@sysmocom.de> | 2021-07-11 02:48:31 +0200 |
---|---|---|
committer | Eric <ewild@sysmocom.de> | 2021-07-11 21:10:21 +0200 |
commit | 387304c41d36ca8ce84910c2c90b2f38158b35e0 (patch) | |
tree | 09aefbdcafce457c42f9427a2021ef03cf752328 | |
parent | b3cb0c14bb85e1f961b3777d025f6d040d7303d2 (diff) |
m3ua: fix leaky usage of m3ua_tx_xua_asp
m3ua_tx_xua_asp will at some point convert the xua msg to a msgb by
copying and then send it, the xua msg still needs to be freed by the
caller.
Closes: OS#5185
Change-Id: Id8584b99f30f2db602d4d129e4114821697272ab
-rw-r--r-- | src/m3ua.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -752,8 +752,10 @@ int m3ua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg) err = m3ua_gen_error_msg(rc, msg); out: - if (err) + if (err) { m3ua_tx_xua_asp(asp, err); + xua_msg_free(err); + } xua_msg_free(xua); @@ -856,6 +858,7 @@ void m3ua_tx_snm_available(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsig xua = m3ua_encode_duna(rctx, num_rctx, aff_pc, num_aff_pc, info_string); m3ua_tx_xua_asp(asp, xua); + xua_msg_free(xua); } /*! Transmit SSNM DUPU message indicating user unavailability. @@ -871,6 +874,7 @@ void m3ua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int n { struct xua_msg *xua = m3ua_encode_dupu(rctx, num_rctx, dpc, user, cause, info_str); m3ua_tx_xua_asp(asp, xua); + xua_msg_free(xua); } /* received SNM message on ASP side */ |