Commit 9a0d36e5 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent bf0ba75c
......@@ -163,6 +163,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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment