From 595ab7340dd74dcdfd1aa5675fccd49b3e004726 Mon Sep 17 00:00:00 2001 From: Steve Murphy Date: Thu, 31 Jan 2008 19:30:37 +0000 Subject: [PATCH] closes issue #11845; that's the one where there's a 1004 byte cdr leak with every AMI Redirect to a zap channel git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101480 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/pbx.c b/main/pbx.c index a6ef3ded01..e1a2d2e878 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -4604,7 +4604,8 @@ int ast_async_goto(struct ast_channel *chan, const char *context, const char *ex 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;