]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_uspp: Fix potential leak of dict on error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 10 Sep 2020 14:57:13 +0000 (16:57 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 11 Sep 2020 12:41:08 +0000 (14:41 +0200)
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/vf_uspp.c

index f6fb1934331f4fb5436e93e45ab1194a6cffaacb..72a0f562af62f76d79848aa286b20dc1a9a644db 100644 (file)
@@ -362,9 +362,9 @@ static int config_input(AVFilterLink *inlink)
         avctx_enc->global_quality = 123;
         av_dict_set(&opts, "no_bitstream", "1", 0);
         ret = avcodec_open2(avctx_enc, enc, &opts);
+        av_dict_free(&opts);
         if (ret < 0)
             return ret;
-        av_dict_free(&opts);
         av_assert0(avctx_enc->codec);
     }