1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-17 20:17:55 +02:00

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>
This commit is contained in:
Andreas Rheinhardt 2020-04-27 05:42:09 +02:00
parent 32467cfc07
commit b7d11cc6e8

View File

@ -1497,6 +1497,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;
}