aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 16:59:07 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 16:59:07 +0000
commitde7685531815fc619a99c3c80547a8abf4193157 (patch)
treedd3bb361d72540e3d19c2a16a6a3ac807a97a6ca /main
parentada0ca4eb745eb3a04bf9d98198202104c7d251e (diff)
Destroy the channel lock after the channel datastores.
(inspired by issue #12187) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108031 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index a12c4ef44..e037d211d 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -1223,7 +1223,6 @@ void ast_channel_free(struct ast_channel *chan)
if (chan->pbx)
ast_log(LOG_WARNING, "PBX may not have been terminated properly on '%s'\n", chan->name);
free_cid(&chan->cid);
- ast_mutex_destroy(&chan->lock);
/* Close pipes if appropriate */
if ((fd = chan->alertpipe[0]) > -1)
close(fd);
@@ -1250,6 +1249,8 @@ void ast_channel_free(struct ast_channel *chan)
/* Destroy the jitterbuffer */
ast_jb_destroy(chan);
+
+ ast_mutex_destroy(&chan->lock);
ast_string_field_free_memory(chan);
free(chan);