mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-07 13:49:18 +00:00
Destroy the channel lock after the channel datastores.
(inspired by issue #12187) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@108031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1223,7 +1223,6 @@ void ast_channel_free(struct ast_channel *chan)
|
|||||||
if (chan->pbx)
|
if (chan->pbx)
|
||||||
ast_log(LOG_WARNING, "PBX may not have been terminated properly on '%s'\n", chan->name);
|
ast_log(LOG_WARNING, "PBX may not have been terminated properly on '%s'\n", chan->name);
|
||||||
free_cid(&chan->cid);
|
free_cid(&chan->cid);
|
||||||
ast_mutex_destroy(&chan->lock);
|
|
||||||
/* Close pipes if appropriate */
|
/* Close pipes if appropriate */
|
||||||
if ((fd = chan->alertpipe[0]) > -1)
|
if ((fd = chan->alertpipe[0]) > -1)
|
||||||
close(fd);
|
close(fd);
|
||||||
@@ -1251,6 +1250,8 @@ void ast_channel_free(struct ast_channel *chan)
|
|||||||
/* Destroy the jitterbuffer */
|
/* Destroy the jitterbuffer */
|
||||||
ast_jb_destroy(chan);
|
ast_jb_destroy(chan);
|
||||||
|
|
||||||
|
ast_mutex_destroy(&chan->lock);
|
||||||
|
|
||||||
ast_string_field_free_memory(chan);
|
ast_string_field_free_memory(chan);
|
||||||
free(chan);
|
free(chan);
|
||||||
AST_LIST_UNLOCK(&channels);
|
AST_LIST_UNLOCK(&channels);
|
||||||
|
Reference in New Issue
Block a user