[FFmpeg-devel] [PATCH 1/5] fftools/ffmpeg_mux_init: Fix leak on error

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Jul 22 22:09:51 EEST 2023


Fixes Coverity issue #1539098.

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

diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 86521417ec..0289cdabad 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -361,7 +361,7 @@ static int enc_stats_init(OutputStream *ost, EncStats *es, int pre,
 
         ret = GROW_ARRAY(es->components, es->nb_components);
         if (ret < 0)
-            return ret;
+            goto fail;
 
         c = &es->components[es->nb_components - 1];
 
-- 
2.34.1



More information about the ffmpeg-devel mailing list