aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-05-01 08:51:17 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-06-24 08:02:34 +0200
commit25346fe0d7a8b83acdee8332bec921dbb254f016 (patch)
tree119c2b9df41cab0def2565a4a76926ef0a2bf6c3 /src/osmo-bts-sysmo/l1_if.c
parenta7e75377767e86a3e5645c22239770b1939e9899 (diff)
sysmobts: Fix potential memory leaks in the prim callback handling
Make sure the l1msg is always freed in the callback. There were several error conditions were the msgb would not have been freed, in the case of the calib data and the system information the message was not freed even in normal condition. I will modify this code to __use a msgb. This allows to re-use the allocated msgb across read operations.
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index cc33a293..16f15239 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1128,6 +1128,8 @@ static int info_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp)
"as software was compiled against old header files\n");
#endif
+ msgb_free(resp);
+
/* FIXME: clock related */
return 0;
}