lavfi/tile: do not leak input frame
authorPaul B Mahol <onemda@gmail.com>
Thu, 22 Aug 2013 20:31:22 +0000 (20:31 +0000)
committerPaul B Mahol <onemda@gmail.com>
Fri, 23 Aug 2013 10:28:29 +0000 (10:28 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/vf_tile.c

index fb3ac85..910a9fc 100644 (file)
@@ -172,8 +172,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
 
     if (!tile->current) {
         tile->out_ref = ff_get_video_buffer(outlink, outlink->w, outlink->h);
-        if (!tile->out_ref)
+        if (!tile->out_ref) {
+            av_frame_free(&picref);
             return AVERROR(ENOMEM);
+        }
         av_frame_copy_props(tile->out_ref, picref);
         tile->out_ref->width  = outlink->w;
         tile->out_ref->height = outlink->h;