summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-01 10:31:53 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-01 10:31:53 +0800
commitbe3fdc2c6e11149a15bd321e65d3b7b06308f621 (patch)
tree92d7a7287b337745965ba667e0ee61963829a26e
parent6a8d7653347402986e99d5acc9040a5dcd9ff6d5 (diff)
nat: Fix memory leak... in MGCP forwarding
The code needs to be refactored but this is fixing the leak for now. We used to forward everything to the BSC but now we handle the DLCX locally and this means we need to clear the patched message. We should refactor it to not generate the patched msg until a lot later.
-rw-r--r--openbsc/src/nat/bsc_mgcp_utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c
index 6e28095d0..5d77c2bd9 100644
--- a/openbsc/src/nat/bsc_mgcp_utils.c
+++ b/openbsc/src/nat/bsc_mgcp_utils.c
@@ -256,6 +256,7 @@ int bsc_mgcp_policy_cb(struct mgcp_config *cfg, int endpoint, int state, const c
return MGCP_POLICY_DEFER;
} else if (state == MGCP_ENDP_DLCX) {
/* we will free the endpoint now and send a DLCX to the BSC */
+ msgb_free(bsc_msg);
bsc_mgcp_dlcx(sccp);
return MGCP_POLICY_CONT;
} else {