1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00

avformat/mpsubdec: Clear queue on error

Fixes: Memleaks
Fixes: 17219/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5720539124989952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9a0d36e562)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-09-21 13:43:19 +02:00
parent 9462ca109f
commit f83710ee4b

View File

@ -106,6 +106,9 @@ static int mpsub_read_header(AVFormatContext *s)
ff_subtitles_queue_finalize(s, &mpsub->q);
end:
if (res < 0)
ff_subtitles_queue_clean(&mpsub->q);
av_bprint_finalize(&buf, NULL);
return res;
}