diff mbox

[FFmpeg-devel,mov] Fix leak of frame_duration_buffer in mov_fix_index().

Message ID CAPUDrwe=qr7F_r4Y6MK4Zs_ysX5qAPHOoVRc7Bubg_sUFe6SeQ@mail.gmail.com
State New
Headers show

Commit Message

Dale Curtis Nov. 17, 2017, 10:54 p.m. UTC
Should be unconditionally freed at the end of mov_fix_index() in case it
hasn't been used during the fix up.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>

Comments

Sasi Inguva Nov. 18, 2017, 9:05 a.m. UTC | #1
LGTM. Thanks for the fix.

On Sat, Nov 18, 2017 at 4:24 AM, Dale Curtis <dalecurtis@chromium.org>
wrote:

> Should be unconditionally freed at the end of mov_fix_index() in case it
> hasn't been used during the fix up.
>
> Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
>
Michael Niedermayer Nov. 18, 2017, 10:52 a.m. UTC | #2
On Sat, Nov 18, 2017 at 02:35:35PM +0530, Sasi Inguva wrote:
> LGTM. Thanks for the fix.

will apply

thanks

[...]
diff mbox

Patch

From bbdf90542a98bb297d4143949e3281500815d0b1 Mon Sep 17 00:00:00 2001
From: Dale Curtis <dalecurtis@chromium.org>
Date: Fri, 17 Nov 2017 14:53:25 -0800
Subject: [PATCH] [mov] Fix leak of frame_duration_buffer in mov_fix_index().

Should be unconditionally freed at the end of mov_fix_index() in
case it hasn't been used during the fix up.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
---
 libavformat/mov.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index d49d820d2b..3eef043046 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3553,6 +3553,7 @@  static void mov_fix_index(MOVContext *mov, AVStream *st)
     // Free the old index and the old CTTS structures
     av_free(e_old);
     av_free(ctts_data_old);
+    av_freep(&frame_duration_buffer);
 
     // Null terminate the index ranges array
     current_index_range++;
-- 
2.15.0.448.gf294e3d99a-goog