From 3e717dce36538db9e8ef62302245b9279d66a534 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 12 Mar 2008 17:03:18 +0000 Subject: [PATCH] Merged revisions 108032 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r108032 | russell | 2008-03-12 12:02:57 -0500 (Wed, 12 Mar 2008) | 12 lines Merged revisions 108031 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r108031 | russell | 2008-03-12 11:59:07 -0500 (Wed, 12 Mar 2008) | 4 lines Destroy the channel lock after the channel datastores. (inspired by issue #12187) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108033 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/channel.c b/main/channel.c index 20f432682b..19d7a7c2c2 100644 --- a/main/channel.c +++ b/main/channel.c @@ -1287,7 +1287,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_dont_use); /* Close pipes if appropriate */ if ((fd = chan->alertpipe[0]) > -1) close(fd); @@ -1321,6 +1320,8 @@ void ast_channel_free(struct ast_channel *chan) /* Destroy the jitterbuffer */ ast_jb_destroy(chan); + + ast_mutex_destroy(&chan->lock_dont_use); ast_string_field_free_memory(chan); ast_free(chan);