diff mbox

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

Message ID 20180419163522.6033-1-modmaker@google.com
State Accepted
Commit 606c5c7f3ad1d289ef745b9053024ad318646c7e
Headers show

Commit Message

Jacob Trimble April 19, 2018, 4:35 p.m. UTC
Signed-off-by: Jacob Trimble <modmaker@google.com>
---
 libavformat/mov.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Niedermayer April 19, 2018, 7:52 p.m. UTC | #1
On Thu, Apr 19, 2018 at 09:35:22AM -0700, Jacob Trimble wrote:
> Signed-off-by: Jacob Trimble <modmaker@google.com>
> ---
>  libavformat/mov.c | 1 +
>  1 file changed, 1 insertion(+)

will apply

thx

[...]
diff mbox

Patch

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