diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-06-14 03:12:00 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-03 16:15:57 +0200 |
commit | 49ea0726c2559587cc031e53ead2261681f54317 (patch) | |
tree | 000d22cd55e87156951b5a0d089f114727deb791 | |
parent | 01e64c3ba9a137c831782c4fb6b7928ac18d1d5b (diff) | |
download | ffmpeg-49ea0726c2559587cc031e53ead2261681f54317.tar.gz |
avformat/lrcdec: Fix memleak upon read header failure
The already parsed subtitles (contained in an FFDemuxSubtitlesQueue)
would leak if an error happened upon reading a subsequent subtitle.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit d38694cea9f289b3f9dcce1a2f07746d029b35f3)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | libavformat/lrcdec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/lrcdec.c b/libavformat/lrcdec.c index f4e9a4efa9..45f0bf24a7 100644 --- a/libavformat/lrcdec.c +++ b/libavformat/lrcdec.c @@ -202,6 +202,7 @@ static int lrc_read_header(AVFormatContext *s) sub = ff_subtitles_queue_insert(&lrc->q, line.str + ts_strlength, line.len - ts_strlength, 0); if(!sub) { + ff_subtitles_queue_clean(&lrc->q); return AVERROR(ENOMEM); } sub->pos = pos; |