From 806824d6758c6455e601e2ec79a9d12b4fd60e37 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Thu, 23 Apr 2009 19:18:49 +0000 Subject: [PATCH] Merged revisions 190287 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r190287 | file | 2009-04-23 16:15:30 -0300 (Thu, 23 Apr 2009) | 13 lines Merged revisions 190286 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r190286 | file | 2009-04-23 16:13:18 -0300 (Thu, 23 Apr 2009) | 6 lines Fix a bug in chan_local glare hangup detection. If both sides of a Local channel were hung up at around the same time it was possible for one thread to destroy the local private structure and have the other thread immediately try to remove the already freed structure from the local channel list. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@190297 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_local.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/channels/chan_local.c b/channels/chan_local.c index de161d6afd..b87b35659a 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -629,13 +629,10 @@ static int local_hangup(struct ast_channel *ast) let local_queue do it. */ if (glaredetect) ast_set_flag(p, LOCAL_CANCEL_QUEUE); - ast_mutex_unlock(&p->lock); /* Remove from list */ AST_LIST_LOCK(&locals); AST_LIST_REMOVE(&locals, p, list); AST_LIST_UNLOCK(&locals); - /* Grab / release lock just in case */ - ast_mutex_lock(&p->lock); ast_mutex_unlock(&p->lock); /* And destroy */ if (!glaredetect) {