[asterisk-commits] murf: trunk r140691 - in /trunk: ./ main/channel.c main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 2 17:51:00 CDT 2008
Author: murf
Date: Tue Sep 2 17:50:59 2008
New Revision: 140691
URL: http://svn.digium.com/view/asterisk?view=rev&rev=140691
Log:
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:
trunk/ (props changed)
trunk/main/channel.c
trunk/main/pbx.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=140691&r1=140690&r2=140691
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Sep 2 17:50:59 2008
@@ -1360,6 +1360,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);
@@ -1642,6 +1647,7 @@
ast_cdr_end(chan->cdr);
ast_cdr_detach(chan->cdr);
+ chan->cdr = NULL;
}
ast_channel_free(chan);
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=140691&r1=140690&r2=140691
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Sep 2 17:50:59 2008
@@ -7087,6 +7087,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