diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-08-13 14:48:44 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-08-13 14:48:44 +0200 |
commit | 27876a2df0c76ab43f528f21d942d4461dc3a759 (patch) | |
tree | 00c6c4b2451a9a6087bdbf76ba730866d8b8e6d0 /openbsc/src | |
parent | 996215123011272d524dea859407b3c7e2aab2fd (diff) |
nat: Fix potential memory leak when reading a message
Spotted while going through the code with Jacob. We could have
leaked the msgb in case of error.
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_ussd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c index e0c5c6dda..f7753fb49 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c +++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c @@ -128,6 +128,7 @@ static int ussd_read_cb(struct osmo_fd *bfd) if (ret < 0) { LOGP(DNAT, LOGL_ERROR, "ignoring IPA response " "message with malformed TLVs\n"); + msgb_free(msg); return ret; } if (TLVP_PRESENT(&tvp, IPAC_IDTAG_UNITNAME)) |