[asterisk-commits] russell: branch 1.4 r108031 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 12 11:59:07 CDT 2008


Author: russell
Date: Wed Mar 12 11:59:07 2008
New Revision: 108031

URL: http://svn.digium.com/view/asterisk?view=rev&rev=108031
Log:
Destroy the channel lock after the channel datastores.

(inspired by issue #12187)

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=108031&r1=108030&r2=108031
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Wed Mar 12 11:59:07 2008
@@ -1223,7 +1223,6 @@
 	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 @@
 
 	/* Destroy the jitterbuffer */
 	ast_jb_destroy(chan);
+	
+	ast_mutex_destroy(&chan->lock);
 
 	ast_string_field_free_memory(chan);
 	free(chan);




More information about the asterisk-commits mailing list