[FFmpeg-cvslog] avformat/mov: Fix memory leak in encryption info.

Jacob Trimble git at videolan.org
Thu Apr 19 22:53:03 EEST 2018


ffmpeg | branch: master | Jacob Trimble <modmaker-at-google.com at ffmpeg.org> | Thu Apr 19 09:35:22 2018 -0700| [606c5c7f3ad1d289ef745b9053024ad318646c7e] | committer: Michael Niedermayer

avformat/mov: Fix memory leak in encryption info.

Signed-off-by: Jacob Trimble <modmaker at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=606c5c7f3ad1d289ef745b9053024ad318646c7e
---

 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);



More information about the ffmpeg-cvslog mailing list