aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-23 19:13:18 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-23 19:13:18 +0000
commit231b5566af84de77b743bd4051915caa2a9f678b (patch)
tree30c672212efce0d3262bd5c96b71417f07c27d5b
parent0f054b7cb93d5601631db00a0c697edd3ecfb6da (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@190286 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_local.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index db8bec313..aa81af51c 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -590,13 +590,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) {