Fix two cases of memory corruption caused by background threads.

Reported by: atis
Patch by: tilghman
Fixes issue #10923


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-11-12 17:29:17 +00:00
parent c2c1e68238
commit 1a052e0498
2 changed files with 10 additions and 0 deletions

View File

@@ -1709,6 +1709,8 @@ int ast_hangup(struct ast_channel *chan)
detach_spies(chan); /* get rid of spies */
ast_autoservice_stop(chan);
if (chan->masq) {
if (ast_do_masquerade(chan))
ast_log(LOG_WARNING, "Failed to perform masquerade\n");