From e6254eeb34f44bfa60db257969095023b23c352f Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Tue, 16 May 2006 20:05:17 +0000 Subject: [PATCH] don't leak frames when deferring DTMF or dropping duplicate ANSWER frames (issue #7041, slightly different fix, reported/patched by clausf) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27468 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/channel.c b/channel.c index ae4c747e4e..77ad5f34e1 100644 --- a/channel.c +++ b/channel.c @@ -1950,10 +1950,12 @@ struct ast_frame *ast_read(struct ast_channel *chan) chan->dtmfq[strlen(chan->dtmfq)] = f->subclass; else ast_log(LOG_WARNING, "Dropping deferred DTMF digits on %s\n", chan->name); + ast_frfree(f); f = &null_frame; } else if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) { if (prestate == AST_STATE_UP) { ast_log(LOG_DEBUG, "Dropping duplicate answer!\n"); + ast_frfree(f); f = &null_frame; } /* Answer the CDR */