From: Mark Michelson Date: Wed, 13 May 2009 19:50:37 +0000 (+0000) Subject: Recorded merge of revisions 194357 via svnmerge from X-Git-Tag: 1.6.1.3-rc1~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c4e45ab6e116309c9aa1fb27267699c5c6e4feb;p=thirdparty%2Fasterisk.git Recorded merge of revisions 194357 via svnmerge from 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 --- diff --git a/main/channel.c b/main/channel.c index 4e854a5e8b..106bd2ae5e 100644 --- a/main/channel.c +++ b/main/channel.c @@ -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