aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-16 20:05:17 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-16 20:05:17 +0000
commitf5a82873ae46ca34c99dc00cc21cd4bd571ab7cb (patch)
tree1582503f74d8d027e8001ae66413decabd7e9814 /channel.c
parentbc26e515b0dba5424028d5352c565298fe5767b7 (diff)
don't leak frames when deferring DTMF or dropping duplicate ANSWER frames (issue #7041, slightly different fix, reported/patched by clausf)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@27468 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index ae4c747e4..77ad5f34e 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 */