fftools/ffmpeg_mux_init: Free pts on error

Fixes: CID1538863 Resource leak

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-04-28 00:27:01 +02:00
parent d9b9fc4be2
commit 840f2bc18e
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -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);