]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't leak a frame in the case that an END frame is received and the time since
authorRussell Bryant <russell@russellbryant.com>
Mon, 22 Oct 2007 15:52:48 +0000 (15:52 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 22 Oct 2007 15:52:48 +0000 (15:52 +0000)
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

main/channel.c

index 7c22fcf4bbca8bcdc8c567cfb4317d6af3ffc419..76e3af2903affc80e6392e411d8ea422f1483d4c 100644 (file)
@@ -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);