diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-07 23:29:01 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-07 23:29:01 +0000 |
commit | ecbbfe3fb82f0a9493aa1d75c9b7146168c6b703 (patch) | |
tree | ddff99ef73b40c01e79b853e6ea53052e0e5d917 | |
parent | e136240e1664135ba5c3477326d8fec35461e283 (diff) |
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/branches/1.4@91890 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/dsp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/dsp.c b/main/dsp.c index f72759d07..4ec1a8265 100644 --- a/main/dsp.c +++ b/main/dsp.c @@ -1485,6 +1485,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)) { @@ -1492,6 +1493,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_log(LOG_DEBUG, "Requesting Hangup because the busy tone was detected on channel %s\n", chan->name); return &dsp->f; } |