]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Recorded merge of revisions 194357 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Wed, 13 May 2009 19:50:37 +0000 (19:50 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 13 May 2009 19:50:37 +0000 (19:50 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r194357 | mmichelson | 2009-05-13 14:42:51 -0500 (Wed, 13 May 2009) | 18 lines

  Blocked revisions 194356 via svnmerge

  ........
    r194356 | mmichelson | 2009-05-13 14:41:44 -0500 (Wed, 13 May 2009) | 13 lines

    Remove an extraneous unlocking operation from ast_channel_free.

    In the case that we could not remove the desired channel from the
    list of channels, there was an extra call to unlock the channel list.
    Since we unlock the list later on in the function anyway, this results
    in the list being unlocked twice yet only being locked once.

    (closes issue #15098)
    Reported by: tim_ringenbach
    Patches:
          remove_extra_unlock.diff uploaded by tim (license 540)
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@194359 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 4e854a5e8be2a7b32495037168ae9138f953e4d9..106bd2ae5ec405b562201e73d7e09244a56f0b6a 100644 (file)
@@ -1330,7 +1330,6 @@ void ast_channel_free(struct ast_channel *chan)
        
        AST_RWLIST_WRLOCK(&channels);
        if (!AST_RWLIST_REMOVE(&channels, chan, chan_list)) {
-               AST_RWLIST_UNLOCK(&channels);
                ast_log(LOG_ERROR, "Unable to find channel in list to free. Assuming it has already been done.\n");
        }
        /* Lock and unlock the channel just to be sure nobody has it locked still