[FFmpeg-cvslog] fftools/ffmpeg_mux_init: Fix leak on error

Andreas Rheinhardt git at videolan.org
Sun Jul 23 18:54:58 EEST 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jul 22 20:28:25 2023 +0200| [2a44c4bc9e2623e623981efe9f2510a45fce84f1] | committer: Andreas Rheinhardt

fftools/ffmpeg_mux_init: Fix leak on error

Fixes Coverity issue #1539098.

Reviewed-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 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];
 



More information about the ffmpeg-cvslog mailing list