aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJean-Francois Dionne <jf.dionne@nutaq.com>2017-01-24 11:21:07 -0500
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-01-31 11:06:52 +0000
commit8c45ae59f95d4b3efcffbd1b846d26e1de341931 (patch)
treeb77ac5819acbd808f0b880df95842329cae9019e /src
parentd81e5e963aca09e79b0536d8f0d5ccf0a977f79c (diff)
sysmo,lc15: fix memory leak at each call placed
Max's note: added same fix for default case and ported it to sysmobts. Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-litecell15/l1_if.c4
-rw-r--r--src/osmo-bts-sysmo/l1_if.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index c70bd9ec..0c5ef6b8 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1093,8 +1093,10 @@ static int l1if_handle_ind(struct lc15l1_hdl *fl1, struct msgb *msg)
rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg);
break;
case GsmL1_PrimId_MphSyncInd:
+ msgb_free(msg);
break;
case GsmL1_PrimId_PhConnectInd:
+ msgb_free(msg);
break;
case GsmL1_PrimId_PhReadyToSendInd:
rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd,
@@ -1107,7 +1109,7 @@ static int l1if_handle_ind(struct lc15l1_hdl *fl1, struct msgb *msg)
rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg);
break;
default:
- break;
+ msgb_free(msg);
}
return rc;
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 82db8d70..490264f1 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1081,8 +1081,10 @@ static int l1if_handle_ind(struct femtol1_hdl *fl1, struct msgb *msg)
rc = handle_mph_time_ind(fl1, &l1p->u.mphTimeInd, msg);
break;
case GsmL1_PrimId_MphSyncInd:
+ msgb_free(msg);
break;
case GsmL1_PrimId_PhConnectInd:
+ msgb_free(msg);
break;
case GsmL1_PrimId_PhReadyToSendInd:
rc = handle_ph_readytosend_ind(fl1, &l1p->u.phReadyToSendInd,
@@ -1095,7 +1097,7 @@ static int l1if_handle_ind(struct femtol1_hdl *fl1, struct msgb *msg)
rc = handle_ph_ra_ind(fl1, &l1p->u.phRaInd, msg);
break;
default:
- break;
+ msgb_free(msg);
}
return rc;