diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-03 17:09:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-03 17:09:24 +0100 |
commit | 908d010b12fadc36d8cadf6bba5e073e23b9603c (patch) | |
tree | 55ff1bae05e999aa8e42c980263f756d363312f4 /libavfilter/af_sidechaincompress.c | |
parent | edc34c937b703d6eb29a3f63691aeb6637dd4aa4 (diff) | |
download | ffmpeg-908d010b12fadc36d8cadf6bba5e073e23b9603c.tar.gz |
avfilter/af_sidechaincompress: Free out frame on error
Fix memleak
Fixes CID1197065 part 2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/af_sidechaincompress.c')
-rw-r--r-- | libavfilter/af_sidechaincompress.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c index a151a02319..3f540e2dff 100644 --- a/libavfilter/af_sidechaincompress.c +++ b/libavfilter/af_sidechaincompress.c @@ -188,7 +188,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) AVFilterContext *ctx = link->dst; SidechainCompressContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; - AVFrame *out, *in[2] = { NULL }; + AVFrame *out = NULL, *in[2] = { NULL }; double *dst; int nb_samples; int i; @@ -213,6 +213,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) if (!in[i]) { av_frame_free(&in[0]); av_frame_free(&in[1]); + av_frame_free(&out); return AVERROR(ENOMEM); } av_audio_fifo_read(s->fifo[i], (void **)in[i]->data, nb_samples); |