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.
This commit is contained in:
parent
9962151230
commit
27876a2df0
|
@ -128,6 +128,7 @@ static int ussd_read_cb(struct osmo_fd *bfd)
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
LOGP(DNAT, LOGL_ERROR, "ignoring IPA response "
|
LOGP(DNAT, LOGL_ERROR, "ignoring IPA response "
|
||||||
"message with malformed TLVs\n");
|
"message with malformed TLVs\n");
|
||||||
|
msgb_free(msg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (TLVP_PRESENT(&tvp, IPAC_IDTAG_UNITNAME))
|
if (TLVP_PRESENT(&tvp, IPAC_IDTAG_UNITNAME))
|
||||||
|
|
Loading…
Reference in New Issue