summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-07-04 19:09:51 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-07-04 19:09:51 -0500
commitcba550df7aea4fdac8a182215ddacb555824e088 (patch)
tree56b8dcfe12b061496e3c53f8ba72be8f09c69b49
parent49f81ddb85a4460ae69569a87a0ea1ae264e3019 (diff)
parente0f565663b49e14c15d7b5e6e9ff7396956b91f6 (diff)
Merge "chan_sip: Fix early call pickup channel leak." into 13
-rw-r--r--channels/chan_sip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 30cb20de8..1838bdaad 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -24932,10 +24932,12 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req,
if (ast_bridge_impart(bridge, c, replaces_chan, NULL,
AST_BRIDGE_IMPART_CHAN_INDEPENDENT)) {
ast_hangup(c);
+ ast_channel_unref(c);
}
} else {
ast_channel_move(replaces_chan, c);
ast_hangup(c);
+ ast_channel_unref(c);
}
sip_pvt_lock(p);
return 0;