[FFmpeg-cvslog] avfilter/f_loop: Fix leak on error
Michael Niedermayer
git at videolan.org
Sun May 29 23:02:56 CEST 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun May 29 21:21:59 2016 +0200| [645f7c1ce547f247af56990e6306d08d3d6a6286] | committer: Michael Niedermayer
avfilter/f_loop: Fix leak on error
Fixes CID1355117
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=645f7c1ce547f247af56990e6306d08d3d6a6286
---
libavfilter/f_loop.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c
index d8eb692..00e0215 100644
--- a/libavfilter/f_loop.c
+++ b/libavfilter/f_loop.c
@@ -88,8 +88,10 @@ static int push_samples(AVFilterContext *ctx, int nb_samples)
if (!out)
return AVERROR(ENOMEM);
ret = av_audio_fifo_peek_at(s->fifo, (void **)out->extended_data, out->nb_samples, s->current_sample);
- if (ret < 0)
+ if (ret < 0) {
+ av_frame_free(&out);
return ret;
+ }
out->pts = s->pts;
out->nb_samples = ret;
s->pts += out->nb_samples;
More information about the ffmpeg-cvslog
mailing list