aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-04-27 05:42:09 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-03 14:05:44 +0200
commitcb255b616cf1ebc6bc89b3538b6b7465dc2c526b (patch)
tree05af1a64c51f7f8fa01891887471ee225f071d26
parent0aed3002ad3104489d0e378dc9893271d14e0e5b (diff)
downloadffmpeg-cb255b616cf1ebc6bc89b3538b6b7465dc2c526b.tar.gz
avformat/matroskaenc: Fix memleak upon encountering bogus chapter
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavformat/matroskaenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index cccfdb41b6..36b29e2d8d 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;
}