diff mbox series

[FFmpeg-devel,6/7] avformat/matroskaenc: Fix memleak upon encountering bogus chapter

Message ID 20200428083645.4909-6-andreas.rheinhardt@gmail.com
State Accepted
Commit cb255b616cf1ebc6bc89b3538b6b7465dc2c526b
Headers show
Series [FFmpeg-devel,1/7] avformat/matroskaenc: Write SeekHead when livestreaming | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt April 28, 2020, 8:36 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/matroskaenc.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 668b18e9ee..09f08c1e9f 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1463,6 +1463,7 @@  static int mkv_write_chapters(AVFormatContext *s)
             av_log(s, AV_LOG_ERROR,
                    "Invalid chapter start (%"PRId64") or end (%"PRId64").\n",
                    chapterstart, chapterend);
+            ffio_free_dyn_buf(&dyn_cp);
             return AVERROR_INVALIDDATA;
         }