avformat/realtextdec: free queue on error

Fixes: memleak
Fixes: 16277/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5696629440512000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 493438fafc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-08-21 20:37:17 +02:00
parent b881ea0f9e
commit 818a3fd27c
1 changed files with 2 additions and 0 deletions

View File

@ -123,6 +123,8 @@ static int realtext_read_header(AVFormatContext *s)
end:
av_bprint_finalize(&buf, NULL);
if (res < 0)
ff_subtitles_queue_clean(&rt->q);
return res;
}