[asterisk-commits] branch 1.2 - r7268 /branches/1.2/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Dec 1 17:34:59 CST 2005


Author: kpfleming
Date: Thu Dec  1 17:34:58 2005
New Revision: 7268

URL: http://svn.digium.com/view/asterisk?rev=7268&view=rev
Log:
ensure channel's scheduling context is freed (issue #5788)

Modified:
    branches/1.2/channel.c

Modified: branches/1.2/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channel.c?rev=7268&r1=7267&r2=7268&view=diff
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Thu Dec  1 17:34:58 2005
@@ -909,8 +909,11 @@
 		free(chan->tech_pvt);
 	}
 
+	if (chan->sched)
+		sched_context_destroy(chan->sched);
+
 	ast_copy_string(name, chan->name, sizeof(name));
-	
+
 	/* Stop monitoring */
 	if (chan->monitor) {
 		chan->monitor->stop( chan, 0 );
@@ -1294,8 +1297,10 @@
 		ast_closestream(chan->stream);
 	if (chan->vstream)		/* Close video stream */
 		ast_closestream(chan->vstream);
-	if (chan->sched)
+	if (chan->sched) {
 		sched_context_destroy(chan->sched);
+		chan->sched = NULL;
+	}
 	
 	if (chan->generatordata)	/* Clear any tone stuff remaining */ 
 		chan->generator->release(chan, chan->generatordata);



More information about the asterisk-commits mailing list