Fix memleak in mpga demuxer
authorRafaël Carré <funman@videolan.org>
Fri, 9 May 2008 21:29:14 +0000 (23:29 +0200)
committerRafaël Carré <funman@videolan.org>
Fri, 9 May 2008 21:42:05 +0000 (23:42 +0200)
modules/demux/mpeg/mpga.c

index f0cc0c2..1c4d9ec 100644 (file)
@@ -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 );
 }