From: Richard Mudgett Date: Tue, 15 Oct 2013 20:05:47 +0000 (+0000) Subject: chan_iax2: Fix channel left locked in off nominal code path. X-Git-Tag: 13.0.0-beta1~956 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3208058831bbef189f71268076740ee70fe70507;p=thirdparty%2Fasterisk.git chan_iax2: Fix channel left locked in off nominal code path. ........ Merged revisions 401016 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401017 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401020 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 1bbf18eb2c..79732fa426 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -10400,9 +10400,9 @@ static int socket_process_helper(struct iax2_thread *thread) ast_set_read_format(iaxs[fr->callno]->owner, ast_channel_readformat(iaxs[fr->callno]->owner)); } ast_format_cap_copy(native, orignative); - ast_channel_unlock(iaxs[fr->callno]->owner); orignative = ast_format_cap_destroy(orignative); } + ast_channel_unlock(iaxs[fr->callno]->owner); } } else { ast_debug(1, "Neat, somebody took away the channel at a magical time but i found it!\n");