aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-31 19:30:37 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-31 19:30:37 +0000
commit2a36e9138cea6ff680186b3731f7add62e3999ff (patch)
tree76d37c5469098a56ca09037ccf455ab60d11685e /main/pbx.c
parent8be71b1a0bc293f6f058a9292a6dcf99b163bf73 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@101480 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index a6ef3ded0..e1a2d2e87 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;