mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Properly defuse race in chan_local, fix extremely unlikely path for losing lock in chan_agent
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -560,6 +560,8 @@ static struct ast_channel *agent_new(struct agent_pvt *p, int state)
|
||||
tmp->pvt->pvt = NULL;
|
||||
p->app_sleep_cond = 1;
|
||||
ast_channel_free( tmp );
|
||||
ast_pthread_mutex_unlock(&p->lock); /* For other thread to read the condition. */
|
||||
ast_pthread_mutex_unlock(&p->app_lock);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user