[FFmpeg-cvslog] avformat/jacosubdec: Fix leak on error

Andreas Rheinhardt git at videolan.org
Sat Apr 3 01:18:06 EEST 2021


ffmpeg | branch: release/4.4 | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Wed Mar 24 03:15:33 2021 +0100| [fe8ae687389fdbd3ec91b2d2d25ce7e6ad846f39] | committer: Andreas Rheinhardt

avformat/jacosubdec: Fix leak on error

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
(cherry picked from commit 4f11685e4c882c0dad3c946c6314def140de3205)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe8ae687389fdbd3ec91b2d2d25ce7e6ad846f39
---

 libavformat/jacosubdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index 0576784da4..9c6640eef8 100644
--- a/libavformat/jacosubdec.c
+++ b/libavformat/jacosubdec.c
@@ -199,6 +199,7 @@ static int jacosub_read_header(AVFormatContext *s)
 
             sub = ff_subtitles_queue_insert(&jacosub->q, line, len, merge_line);
             if (!sub) {
+                av_bprint_finalize(&header, NULL);
                 ret = AVERROR(ENOMEM);
                 goto fail;
             }



More information about the ffmpeg-cvslog mailing list