summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-07-30 16:46:50 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-07-30 16:46:50 +0700
commit8208a336ab5ed81f8fcf628c6d3f0fbbef12c393 (patch)
treede24ddb278334b3862618ea5d55328ce73a6665e /src
parentdf2b46471d9801d12ac8e1cd44041a1827c751e2 (diff)
layer23/mobile: fix a memory leak (msgb) in gsm48_rr_data_ind()
Diffstat (limited to 'src')
-rw-r--r--src/host/layer23/src/mobile/gsm48_rr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index 74b94c4f..0449ee31 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -4633,8 +4633,10 @@ static int gsm48_rr_data_ind(struct osmocom_ms *ms, struct msgb *msg)
uint8_t skip_ind = (gh->proto_discr & 0xf0) >> 4;
/* ignore if skip indicator is not B'0000' */
- if (skip_ind)
+ if (skip_ind) {
+ msgb_free(msg);
return 0;
+ }
switch(gh->msg_type) {
case GSM48_MT_RR_ADD_ASS: