aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-13 19:44:07 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-13 19:44:07 +0000
commit107993f4dbbcca602d0d68750882c82a4b59eecb (patch)
tree2d9f232c631d9b7185aa66c355b4d745db03b90c /channels
parent393351fa2ca92301c969a34e8affd750a443c529 (diff)
Fix a crash caused by two threads thinking they should both free the
chan_local private structure when only one should. (closes issue #15314) Reported by: sroberts Patches: Issue15314_Move_Nulling_owner.patch uploaded by davidw (license 780) Tested by: davidw, lottc git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@230038 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 58692899c..b39aeccd1 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -574,11 +574,11 @@ static int local_hangup(struct ast_channel *ast)
ast_clear_flag(p, LOCAL_LAUNCHED_PBX);
ast_module_user_remove(p->u_chan);
} else {
- p->owner = NULL;
ast_module_user_remove(p->u_owner);
while (p->chan && ast_channel_trylock(p->chan)) {
DEADLOCK_AVOIDANCE(&p->lock);
}
+ p->owner = NULL;
if (p->chan) {
ast_queue_hangup(p->chan);
ast_channel_unlock(p->chan);