[vlc-commits] demux: mp4: fix incorrect free

Francois Cartegnie git at videolan.org
Sat May 20 13:55:26 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 19 11:00:23 2017 +0200| [5e78b3d8866998505bc00b50042c3bace337b15e] | committer: Francois Cartegnie

demux: mp4: fix incorrect free

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e78b3d8866998505bc00b50042c3bace337b15e
---

 modules/demux/mp4/mp4.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 99c02ac50f..0e137cb90f 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4250,7 +4250,8 @@ static int FragDemuxTrack( demux_t *p_demux, mp4_track_t *p_track,
         p_track->context.i_trun_sample_pos += i_read;
         if( i_read < len || p_block == NULL )
         {
-            free( p_block );
+            if( p_block )
+                block_Release( p_block );
             return VLC_DEMUXER_EOF;
         }
 



More information about the vlc-commits mailing list