Message ID | 20240413023726.1843852-1-lumingyindetect@163.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] fftools/ffmpeg_mux_init: fix a memory leak in ffmpeg_mux_init.c | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 6d8bd5bcdf..d2146cef8c 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -2851,8 +2851,10 @@ 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); + sizeof(*pts)))) { + ret = AVERROR(ENOMEM); + goto fail; + } if (p[8]) { ret = av_parse_time(&t, p + 8, 1);
Signed-off-by: LuMingYin <lumingyindetect@163.com> --- fftools/ffmpeg_mux_init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)