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-07-02 00:07:28 +0200
commitb568b4683ec12a553c82437811814afd6fcb3a90 (patch)
tree7a510c6e7bc2e95350c33d627b89920572867c22
parent259edd9293c382299ad04f6133a34f9844fa0f2f (diff)
downloadffmpeg-b568b4683ec12a553c82437811814afd6fcb3a90.tar.gz
avformat/matroskaenc: Fix memleak upon encountering bogus chapter
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit cb255b616cf1ebc6bc89b3538b6b7465dc2c526b) 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 67741cfba6..e2f5e8d26f 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1513,6 +1513,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;
}