mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
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
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user