[asterisk-commits] murf: branch 1.4 r101480 - /branches/1.4/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 31 13:30:37 CST 2008


Author: murf
Date: Thu Jan 31 13:30:37 2008
New Revision: 101480

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101480
Log:
closes issue #11845; that's the one where there's a 1004 byte cdr leak with every AMI Redirect to a zap channel

Modified:
    branches/1.4/main/pbx.c

Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=101480&r1=101479&r2=101480
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Thu Jan 31 13:30:37 2008
@@ -4604,7 +4604,8 @@
 		   at the new location */
 		struct ast_channel *tmpchan = ast_channel_alloc(0, chan->_state, 0, 0, chan->accountcode, chan->exten, chan->context, chan->amaflags, "AsyncGoto/%s", chan->name);
 		if (chan->cdr) {
-			tmpchan->cdr = ast_cdr_dup(chan->cdr);
+			ast_cdr_discard(tmpchan->cdr);
+			tmpchan->cdr = ast_cdr_dup(chan->cdr);  /* share the love */
 		}
 		if (!tmpchan)
 			res = -1;




More information about the asterisk-commits mailing list