avfilter/vf_perspective: Free out AVFrame on error
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 3 Feb 2017 18:37:18 +0000 (19:37 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 3 Feb 2017 20:52:22 +0000 (21:52 +0100)
Fixes memleak
Fixes part of CID1197065

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vf_perspective.c

index d590cfa..9249509 100644 (file)
@@ -463,6 +463,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 
     if (s->eval_mode == EVAL_MODE_FRAME) {
         if ((ret = calc_persp_luts(ctx, inlink)) < 0) {
+            av_frame_free(&out);
             return ret;
         }
     }