[FFmpeg-cvslog] avfilter/vf_uspp: Fix potential leak of dict on error

Andreas Rheinhardt git at videolan.org
Fri Sep 11 16:23:31 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Sep 10 16:57:13 2020 +0200| [8443848dfc632334439d4eae7e446167682a4ddb] | committer: Andreas Rheinhardt

avfilter/vf_uspp: Fix potential leak of dict on error

Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8443848dfc632334439d4eae7e446167682a4ddb
---

 libavfilter/vf_uspp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c
index f6fb193433..72a0f562af 100644
--- a/libavfilter/vf_uspp.c
+++ b/libavfilter/vf_uspp.c
@@ -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);
     }
 



More information about the ffmpeg-cvslog mailing list