[FFmpeg-cvslog] fftools/ffmpeg_mux_init: Free pts on error

Michael Niedermayer git at videolan.org
Fri Jun 7 22:48:15 EEST 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 28 00:27:01 2024 +0200| [840f2bc18eddd72fa886aec30efc82991b920c45] | committer: Michael Niedermayer

fftools/ffmpeg_mux_init: Free pts on error

Fixes: CID1538863 Resource leak

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 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 8797265145..b1cb6cf7bd 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -3025,7 +3025,7 @@ static int parse_forced_key_frames(void *log, KeyframeForceCtx *kf,
             if (nb_ch > INT_MAX - size ||
                 !(pts = av_realloc_f(pts, size += nb_ch - 1,
                                      sizeof(*pts))))
-                return AVERROR(ENOMEM);
+                goto fail;
 
             if (p[8]) {
                 ret = av_parse_time(&t, p + 8, 1);



More information about the ffmpeg-cvslog mailing list