[vlc-devel] commit: Fix memleak in mpga demuxer ( Rafaël Carré )

git version control git at videolan.org
Fri May 9 23:41:19 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri May  9 23:29:14 2008 +0200| [9a90c961a6d1c670a9e282c99ea8da0ba7688eab]

Fix memleak in mpga demuxer

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

 modules/demux/mpeg/mpga.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/mpga.c b/modules/demux/mpeg/mpga.c
index f0cc0c2..1c4d9ec 100644
--- a/modules/demux/mpeg/mpga.c
+++ b/modules/demux/mpeg/mpga.c
@@ -273,9 +273,7 @@ static int Demux( demux_t *p_demux )
     {
         p_sys->b_start = false;
         p_block_in = p_sys->p_block_in;
-        p_sys->p_block_in = NULL;
         p_block_out = p_sys->p_block_out;
-        p_sys->p_block_out = NULL;
     }
     else
     {
@@ -327,6 +325,7 @@ static void Close( vlc_object_t * p_this )
 
     DESTROY_PACKETIZER( p_sys->p_packetizer );
     if( p_sys->p_block_out ) block_Release( p_sys->p_block_out );
+    if( p_sys->p_block_in ) block_Release( p_sys->p_block_in );
 
     free( p_sys );
 }




More information about the vlc-devel mailing list