[Asterisk-code-review] chan sip: Fix early call pickup channel leak. (asterisk[13])
Walter Doekes
asteriskteam at digium.com
Thu Jul 2 09:15:22 CDT 2015
Walter Doekes has uploaded a new change for review.
https://gerrit.asterisk.org/774
Change subject: chan_sip: Fix early call pickup channel leak.
......................................................................
chan_sip: Fix early call pickup channel leak.
When handle_invite_replaces() was called, and either ast_bridge_impart()
failed or there was no bridge (because the channel we're picking up was
still ringing), chan_sip would leak a channel.
Thanks Matt and Corey for checking the bridge path.
ASTERISK-25226 #close
Change-Id: Ie736bb182170a73eef5bcef0ab0376f645c260c8
---
M channels/chan_sip.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/74/774/1
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 30cb20d..1838bda 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -24932,10 +24932,12 @@
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;
--
To view, visit https://gerrit.asterisk.org/774
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie736bb182170a73eef5bcef0ab0376f645c260c8
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
More information about the asterisk-code-review
mailing list