diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-21 20:37:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:11:55 +0200 |
commit | da4a0e0025142bdabae02686eda311b889734122 (patch) | |
tree | a99e3b4c5f4b9c8233fd4a217bd9ee02c9a31669 | |
parent | b6b0d71e4d8b58d15686f10e3dd50b972177f492 (diff) | |
download | ffmpeg-da4a0e0025142bdabae02686eda311b889734122.tar.gz |
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 493438fafc5c43b7b7c62bf0c21b7cc884034ce9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/realtextdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c index b33d5289f7..4f25754b9f 100644 --- a/libavformat/realtextdec.c +++ b/libavformat/realtextdec.c @@ -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; } |