After introduction of ff_dvdclut_palette_extradata_cat() to convert DVD subtitle palettes from YUV to RGB, a leak is introduced because of the call to ff_alloc_extradata(). This is not necessary, instead we should free the extradata because ff_bprint_to_codecpar_extradata() will finalize the bprint'ed string to the codecpar and set the length.
Fixes leak introduced in 3b0e6c0eccd7d61eb089370fc5f2196c2b30336f. I apologize for not Valgrinding this earlier. Signed-off-by: Marth64 <mart...@proxyid.net> --- libavformat/mov.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 3820983a5d..ea7bf711cf 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10602,9 +10602,7 @@ static int mov_read_header(AVFormatContext *s) if (err < 0) return err; - err = ff_alloc_extradata(st->codecpar, FF_DVDCLUT_EXTRADATA_SIZE); - if (err < 0) - return err; + av_freep(&st->codecpar->extradata); err = ff_dvdclut_palette_extradata_cat(dvdsub_clut, FF_DVDCLUT_CLUT_SIZE, st->codecpar); -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".