[vlc-devel] commit: Fix memleak ( Rémi Denis-Courmont )

git version control git at videolan.org
Fri Mar 28 16:05:02 CET 2008


vlc | branch: 0.8.6-bugfix | Rémi Denis-Courmont <rem at videolan.org> | Wed Mar 26 20:20:13 2008 +0200| [f1d075cd5c9c854c0828220d302f12989aaa87dd]

Fix memleak

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

 modules/demux/mp4/libmp4.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index b2cc4a5..f4fa6b3 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1735,7 +1735,10 @@ static int MP4_ReadBox_padb( stream_t *p_stream, MP4_Box_t *p_box )
     for( i = 0; i < i_read / 2 ; i++ )
     {
         if( i >= count )
+        {
+            MP4_FreeBox_padb( p_box );
             MP4_READBOX_EXIT( 0 );
+        }
         p_box->data.p_padb->i_reserved1[i] = ( (*p_peek) >> 7 )&0x01;
         p_box->data.p_padb->i_pad2[i] = ( (*p_peek) >> 4 )&0x07;
         p_box->data.p_padb->i_reserved1[i] = ( (*p_peek) >> 3 )&0x01;




More information about the vlc-devel mailing list