diff mbox series

[FFmpeg-devel,4/9] avfilter/vf_uspp: Fix potential leak of dict on error

Message ID 20200910214901.25401-4-andreas.rheinhardt@gmail.com
State Accepted
Commit 8443848dfc632334439d4eae7e446167682a4ddb
Headers show
Series [FFmpeg-devel,1/9] avfilter/lavfutils: Don't use uninitialized pointers for freeing | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 10, 2020, 9:48 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavfilter/vf_uspp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicolas George Sept. 11, 2020, 9:17 a.m. UTC | #1
Andreas Rheinhardt (12020-09-10):
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavfilter/vf_uspp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks ok.

Regards,
diff mbox series

Patch

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);
     }