abis_rsl_rcvmsg(): Fix msgb memory leak in error path
Thanks to Andreas Eversberg for spotting this one.
This commit is contained in:
parent
c513ded578
commit
f25b55ec71
|
@ -1907,6 +1907,7 @@ int abis_rsl_rcvmsg(struct msgb *msg)
|
|||
|
||||
if (msgb_l2len(msg) < sizeof(*rslh)) {
|
||||
DEBUGP(DRSL, "Truncated RSL message with l2len: %u\n", msgb_l2len(msg));
|
||||
msgb_free(msg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1935,7 +1936,7 @@ int abis_rsl_rcvmsg(struct msgb *msg)
|
|||
default:
|
||||
LOGP(DRSL, LOGL_NOTICE, "unknown RSL message discriminator "
|
||||
"0x%02x\n", rslh->msg_discr);
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
}
|
||||
msgb_free(msg);
|
||||
return rc;
|
||||
|
|
Loading…
Reference in New Issue