diff options
author | BJ Weschke <bweschke@btwtech.com> | 2005-12-15 02:49:17 +0000 |
---|---|---|
committer | BJ Weschke <bweschke@btwtech.com> | 2005-12-15 02:49:17 +0000 |
commit | 3dd016d7b523f1ea8c4cadcacea5672550bbfcc9 (patch) | |
tree | 1bc3563391d4b58788c6252b062e0ee4c5d839ad /channel.c | |
parent | 565dcc3482e850f24b0c1879fac33a2836b9e4d4 (diff) |
Bug #6003 - Don't free the channel structure until after having sent the manager event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |