summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/primitives.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2018-02-23 07:31:25 +0000
committerHarald Welte <laforge@gnumonks.org>2018-02-23 08:43:21 +0000
commit8b9d3170ff265c934f6271bd445ff5a6788ffffb (patch)
tree5e5d0a9a3c24189f92f9f4f8b74f7562e3333f87 /src/host/layer23/src/mobile/primitives.c
parentaf4bad3125724b585763f94718f3f5c5d3b94f23 (diff)
mobile: Fix memory leak when not using a LUA script
The primitives are still allocated and dispatched but there was no script handler to delete them. Change the ownership to delete it at the end of the dispatch. Change-Id: I510af13bcbb46f73a0a289f26a4921cc90bd986a Fixes: OS#2925
Diffstat (limited to 'src/host/layer23/src/mobile/primitives.c')
-rw-r--r--src/host/layer23/src/mobile/primitives.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c
index 96f0f9c2..aa467128 100644
--- a/src/host/layer23/src/mobile/primitives.c
+++ b/src/host/layer23/src/mobile/primitives.c
@@ -110,6 +110,7 @@ static void dispatch(struct osmocom_ms *ms, struct mobile_prim *prim)
if (intf->ms == ms)
intf->indication(intf, prim);
}
+ msgb_free(prim->hdr.msg);
}
void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started)