layer23/mobile: fix a memory leak (msgb) in gsm48_rr_data_ind()

Change-Id: I55dcccf5b7d27d012908759954182eaec434d26b
This commit is contained in:
Vadim Yanitskiy 2020-07-30 16:46:50 +07:00
parent df2b46471d
commit 8208a336ab
1 changed files with 3 additions and 1 deletions

View File

@ -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: