summaryrefslogtreecommitdiff
path: root/libavformat/realtextdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-21 20:37:17 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-08-22 18:35:44 +0200
commit493438fafc5c43b7b7c62bf0c21b7cc884034ce9 (patch)
tree1a971579e62a37b4463763b171ebc82f4cea418f /libavformat/realtextdec.c
parentab56e62e8f7e02760cfc883956511cab32393315 (diff)
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>
Diffstat (limited to 'libavformat/realtextdec.c')
-rw-r--r--libavformat/realtextdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c
index 204e557aa2..c2316da0ed 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;
}