[FFmpeg-devel] [PATCH] avformat/mov: Fix memory leak in encryption info.
Jacob Trimble
modmaker at google.com
Thu Apr 19 19:35:22 EEST 2018
Signed-off-by: Jacob Trimble <modmaker at google.com>
---
libavformat/mov.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index fc512b8d72..4eda48d617 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5833,6 +5833,7 @@ static int mov_read_sample_encryption_info(MOVContext *c, AVIOContext *pb, MOVSt
if (use_subsamples) {
subsample_count = avio_rb16(pb);
+ av_free((*sample)->subsamples);
(*sample)->subsamples = av_mallocz_array(subsample_count, sizeof(*subsamples));
if (!(*sample)->subsamples) {
av_encryption_info_free(*sample);
--
2.17.0.484.g0c8726318c-goog
More information about the ffmpeg-devel
mailing list