mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
Fix channel reference leak in Originated channels
When originating channels, ast_pbx_outgoing_* caused the dialed channel reference to be bumped twice. Ostensibly, this routine is bumping the channel lifetime such that the channel doesn't get nuked in between locks/unlocks; however, since the routine should return the dialed channel with its reference bumped, it only needs to do this one time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -10101,8 +10101,7 @@ static int pbx_outgoing_attempt(const char *type, struct ast_format_cap *cap, co
|
|||||||
|
|
||||||
/* Wait for dialing to complete */
|
/* Wait for dialing to complete */
|
||||||
if (channel || synchronous) {
|
if (channel || synchronous) {
|
||||||
if (channel) {
|
if (channel && *channel) {
|
||||||
ast_channel_ref(*channel);
|
|
||||||
ast_channel_unlock(*channel);
|
ast_channel_unlock(*channel);
|
||||||
}
|
}
|
||||||
while (!outgoing->dialed) {
|
while (!outgoing->dialed) {
|
||||||
|
Reference in New Issue
Block a user