[FFmpeg-devel] [PATCH 3/5] fftools/opt_common: Fix leak on error

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Jul 22 22:11:28 EEST 2023


Fixes Coverity issue #743443.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 fftools/opt_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fftools/opt_common.c b/fftools/opt_common.c
index 913932c914..7c996f140d 100644
--- a/fftools/opt_common.c
+++ b/fftools/opt_common.c
@@ -1165,6 +1165,7 @@ int init_report(const char *env, FILE **file)
                 av_log(NULL, AV_LOG_FATAL, "Invalid report file level\n");
                 av_free(key);
                 av_free(val);
+                av_free(filename_template);
                 return AVERROR(EINVAL);
             }
             envlevel = 1;
-- 
2.34.1



More information about the ffmpeg-devel mailing list