aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-02-28 22:06:29 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2022-05-04 20:00:05 +0200
commita43a89a08918aefa9dfcf7e6d4dae804c6a48577 (patch)
tree43ca9a14beb02bdf21a1986ac0a026cb59edbfb6
parent156af49b09af3828cd4fed4ab6ca58f1b78949da (diff)
downloadffmpeg-a43a89a08918aefa9dfcf7e6d4dae804c6a48577.tar.gz
fftools/ffmpeg_opt: Fix leak of options when parsing options fails
Fixes #8094. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 21265f42ecb265debe9fec1dbfd0cb7de5a8aefb) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--fftools/ffmpeg_opt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index f0a5cb7914..4efdec702a 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -3272,6 +3272,7 @@ static int open_files(OptionGroupList *l, const char *inout,
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Error parsing options for %s file "
"%s.\n", inout, g->arg);
+ uninit_options(&o);
return ret;
}