Fix memory leak (CID#206)
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 5 Oct 2008 13:53:21 +0000 (16:53 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 5 Oct 2008 13:53:21 +0000 (16:53 +0300)
modules/access/fake.c

index b97c208..03ac7b1 100644 (file)
@@ -228,7 +228,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 static int Demux( demux_t *p_demux )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
-    block_t *p_block = block_New( p_demux, 1 );
 
     if ( !p_sys->i_last_pts )
     {
@@ -244,6 +243,7 @@ static int Demux( demux_t *p_demux )
         mwait( p_sys->i_last_pts );
     }
 
+    block_t *p_block = block_New( p_demux, 1 );
     p_block->i_flags |= BLOCK_FLAG_TYPE_I;
     p_block->i_dts = p_block->i_pts = p_sys->i_last_pts;