gsm/lapdm: Add missing msgb_free in rslms_rx_rll error cases

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Andreas.Eversberg 2011-11-06 20:31:47 +01:00 committed by Harald Welte
parent 5ad4ac800c
commit a42b699516
1 changed files with 2 additions and 0 deletions

View File

@ -1033,6 +1033,7 @@ static int rslms_rx_rll(struct msgb *msg, struct lapdm_channel *lc)
if (msgb_l2len(msg) < sizeof(*rllh)) {
LOGP(DLLAPD, LOGL_ERROR, "Message too short for RLL hdr!\n");
msgb_free(msg);
return -EINVAL;
}
@ -1047,6 +1048,7 @@ static int rslms_rx_rll(struct msgb *msg, struct lapdm_channel *lc)
dl = datalink_for_sapi(le, sapi);
if (!dl) {
LOGP(DLLAPD, LOGL_ERROR, "No instance for SAPI %d!\n", sapi);
msgb_free(msg);
return -EINVAL;
}