diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-11-25 23:59:33 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-11-25 23:59:33 +0300 |
commit | 142894d7202b5559d87f58df30baf48107a816f6 (patch) | |
tree | de11505745a5f9b48889060e618facba30154bab /libavfilter/af_chorus.c | |
parent | fd3df296c157061ffec72e7314d4c9d7bb9c95bc (diff) |
avfilter: do not leak frame if ff_get_audio_buffer() fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_chorus.c')
-rw-r--r-- | libavfilter/af_chorus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/af_chorus.c b/libavfilter/af_chorus.c index 2bdaca348d..c596164382 100644 --- a/libavfilter/af_chorus.c +++ b/libavfilter/af_chorus.c @@ -247,8 +247,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) out_frame = frame; } else { out_frame = ff_get_audio_buffer(inlink, frame->nb_samples); - if (!out_frame) + if (!out_frame) { + av_frame_free(&frame); return AVERROR(ENOMEM); + } av_frame_copy_props(out_frame, frame); } |