[FFmpeg-cvslog] avformat/matroskaenc: Fix leak when writing attachment without filename
Andreas Rheinhardt
git at videolan.org
Sat Apr 10 06:17:47 EEST 2021
ffmpeg | branch: release/4.4 | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Apr 10 00:11:06 2021 +0200| [450f5ae49d87f7e84f4cf58d51fc3708b8708a09] | committer: Andreas Rheinhardt
avformat/matroskaenc: Fix leak when writing attachment without filename
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
(cherry picked from commit 08c805f4ac767444ccc04a37ca6b99d719a6b58f)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=450f5ae49d87f7e84f4cf58d51fc3708b8708a09
---
libavformat/matroskaenc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index bbf231f2a4..b4284a8778 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1768,6 +1768,7 @@ static int mkv_write_attachments(AVFormatContext *s)
put_ebml_string(dyn_cp, MATROSKA_ID_FILEDESC, t->value);
if (!(t = av_dict_get(st->metadata, "filename", NULL, 0))) {
av_log(s, AV_LOG_ERROR, "Attachment stream %d has no filename tag.\n", i);
+ ffio_free_dyn_buf(&dyn_cp);
return AVERROR(EINVAL);
}
put_ebml_string(dyn_cp, MATROSKA_ID_FILENAME, t->value);
More information about the ffmpeg-cvslog
mailing list