aboutsummaryrefslogtreecommitdiffstats
path: root/main/dsp.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-07 23:32:09 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-07 23:32:09 +0000
commit2d63a111def4033935bacffb4257ff56fb55d703 (patch)
tree95de3c0f81985a67512e512eef5fa44cb77fed10 /main/dsp.c
parentdb1a68bf298314798783d9beb28c41cd471bc8db (diff)
Merged revisions 91890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #11273) ........ r91890 | qwell | 2007-12-07 17:29:01 -0600 (Fri, 07 Dec 2007) | 4 lines We need to make sure we free the input frame if we return a different frame in ast_dsp_process. Issue 11273, pointed out by dimas, with a patch by eliel. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91891 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/dsp.c')
-rw-r--r--main/dsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/dsp.c b/main/dsp.c
index 01cac4798..9d268d69f 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -1114,6 +1114,7 @@ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp,
if ((dsp->features & DSP_FEATURE_SILENCE_SUPPRESS) && silence) {
memset(&dsp->f, 0, sizeof(dsp->f));
dsp->f.frametype = AST_FRAME_NULL;
+ ast_frfree(af);
return &dsp->f;
}
if ((dsp->features & DSP_FEATURE_BUSY_DETECT) && ast_dsp_busydetect(dsp)) {
@@ -1121,6 +1122,7 @@ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp,
memset(&dsp->f, 0, sizeof(dsp->f));
dsp->f.frametype = AST_FRAME_CONTROL;
dsp->f.subclass = AST_CONTROL_BUSY;
+ ast_frfree(af);
ast_debug(1, "Requesting Hangup because the busy tone was detected on channel %s\n", chan->name);
return &dsp->f;
}