summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas.Eversberg <jolly@eversberg.eu>2011-11-06 20:31:47 +0100
committerHarald Welte <laforge@gnumonks.org>2011-11-12 23:23:36 +0100
commita42b6995163840edb95667bac0a51d3e801b9a2a (patch)
treef1fd233a93a72e536afc93f00d57829dab95cfad
parent5ad4ac800cf26b8cd2f49c1580678a8df4b55f50 (diff)
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>
-rw-r--r--src/gsm/lapdm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index 82f8b0c..c77e313 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -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;
}