aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-15 02:51:54 +0000
committerbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-15 02:51:54 +0000
commitff1128542c5d971c4bf896d904e204f2cf762ad9 (patch)
tree8ddd72c51ce007d069ddca8da247ac2c57638e6d /channel.c
parent5063af682fde29b9d9a584d96bfb50222cb68b6b (diff)
Bug #6003 - Don't free the channel structure until after having sent the manager event.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7482 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 85a2882ff..1897fb1c6 100644
--- a/channel.c
+++ b/channel.c
@@ -3055,7 +3055,6 @@ int ast_do_masquerade(struct ast_channel *original)
if (ast_test_flag(clone, AST_FLAG_ZOMBIE)) {
ast_log(LOG_DEBUG, "Destroying channel clone '%s'\n", clone->name);
ast_mutex_unlock(&clone->lock);
- ast_channel_free(clone);
manager_event(EVENT_FLAG_CALL, "Hangup",
"Channel: %s\r\n"
"Uniqueid: %s\r\n"
@@ -3066,6 +3065,7 @@ int ast_do_masquerade(struct ast_channel *original)
clone->hangupcause,
ast_cause2str(clone->hangupcause)
);
+ ast_channel_free(clone);
} else {
struct ast_frame null_frame = { AST_FRAME_NULL, };
ast_log(LOG_DEBUG, "Released clone lock on '%s'\n", clone->name);