avfilter/vf_nnedi: fix possible double free
authorPaul B Mahol <onemda@gmail.com>
Mon, 7 Oct 2019 09:10:45 +0000 (11:10 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 7 Oct 2019 09:15:44 +0000 (11:15 +0200)
libavfilter/vf_nnedi.c

index b14aa64..9bad99e 100644 (file)
@@ -809,8 +809,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src)
         ret = get_frame(ctx, 1);
         if (ret < 0) {
             av_frame_free(&s->dst);
-            av_frame_free(&s->src);
             av_frame_free(&s->second);
+            s->src = NULL;
             return ret;
         }
         dst = s->dst;