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.
This commit is contained in:
Holger Hans Peter Freyther 2010-05-01 10:31:53 +08:00
parent 0b0b31c708
commit 3a347f0ace
1 changed files with 1 additions and 0 deletions

View File

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