[asterisk-commits] murf: branch 1.6.0 r140825 - in /branches/1.6.0: ./ main/channel.c main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 3 09:13:51 CDT 2008


Author: murf
Date: Wed Sep  3 09:13:50 2008
New Revision: 140825

URL: http://svn.digium.com/view/asterisk?view=rev&rev=140825
Log:
Merged revisions 140691 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r140691 | murf | 2008-09-02 16:50:59 -0600 (Tue, 02 Sep 2008) | 22 lines

Merged revisions 140670 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140670 | murf | 2008-09-02 16:15:57 -0600 (Tue, 02 Sep 2008) | 14 lines

(closes issue #13409)
Reported by: tomaso
Patches:
      asterisk-1.6.0-rc2-cdrmemleak.patch uploaded by tomaso (license 564)

I basically spent the day, verifying that this patch 
solves the problem, and doesn't hurt in non-problem 
cases. Why valgrind did not plainly reveal this leak
absolutely mystifies and stuns me. 

Many, many thanks to tomaso for finding and providing the fix.



........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/channel.c
    branches/1.6.0/main/pbx.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/channel.c?view=diff&rev=140825&r1=140824&r2=140825
==============================================================================
--- branches/1.6.0/main/channel.c (original)
+++ branches/1.6.0/main/channel.c Wed Sep  3 09:13:50 2008
@@ -1345,6 +1345,11 @@
 
 	/* Destroy the jitterbuffer */
 	ast_jb_destroy(chan);
+
+	if (chan->cdr) {
+		ast_cdr_free(chan->cdr);
+		chan->cdr = NULL;
+	}
 	
 	ast_mutex_destroy(&chan->lock_dont_use);
 
@@ -1657,6 +1662,7 @@
 			
 		ast_cdr_end(chan->cdr);
 		ast_cdr_detach(chan->cdr);
+		chan->cdr = NULL;
 	}
 	
 	ast_channel_free(chan);

Modified: branches/1.6.0/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/pbx.c?view=diff&rev=140825&r1=140824&r2=140825
==============================================================================
--- branches/1.6.0/main/pbx.c (original)
+++ branches/1.6.0/main/pbx.c Wed Sep  3 09:13:50 2008
@@ -6972,6 +6972,7 @@
 	ast_cdr_end(chan->cdr);
 	ast_cdr_failed(chan->cdr);      /* set the status to failed */
 	ast_cdr_detach(chan->cdr);      /* post and free the record */
+	chan->cdr = NULL;
 	ast_channel_free(chan);         /* free the channel */
 
 	return 0;  /* success */




More information about the asterisk-commits mailing list