From: Russell Bryant Date: Mon, 22 Oct 2007 15:52:48 +0000 (+0000) Subject: Don't leak a frame in the case that an END frame is received and the time since X-Git-Tag: 1.4.14~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20ce142d0194c5f99746ec057f1a834b0aa33608;p=thirdparty%2Fasterisk.git Don't leak a frame in the case that an END frame is received and the time since the BEGIN is less than that of the defined minimum DTMF duration. (closes issue #11051) Reported by: casper Patches: channel.c.86664.diff uploaded by casper (license 55) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86750 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/channel.c b/main/channel.c index 7c22fcf4bb..76e3af2903 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2415,6 +2415,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) ast_set_flag(chan, AST_FLAG_EMULATE_DTMF); chan->emulate_dtmf_digit = f->subclass; chan->emulate_dtmf_duration = AST_MIN_DTMF_DURATION - f->len; + ast_frfree(f); f = &ast_null_frame; } else { ast_log(LOG_DTMF, "DTMF end passthrough '%c' on %s\n", f->subclass, chan->name);