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
8c1c28bdef
commit
deff65a9de
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue