Merge "chan_sip: Fix early call pickup channel leak." into 13

This commit is contained in:
Joshua Colp
2015-07-04 19:09:51 -05:00
committed by Gerrit Code Review

View File

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