]> git.sesse.net Git - ffmpeg/commitdiff
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 b14aa64c0462afda46050d1d2fe5941f2056c975..9bad99e98a8474ed879d27df629c920f9e9e338f 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;