]> git.sesse.net Git - vlc/commitdiff
* fixed two memory leaks
authorGildas Bazin <gbazin@videolan.org>
Tue, 19 Mar 2002 12:48:01 +0000 (12:48 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 19 Mar 2002 12:48:01 +0000 (12:48 +0000)
* fixed typo in waveout.c

plugins/dvd/dvd_access.c
plugins/mpeg_vdec/vpar_pool.c
plugins/win32/waveout.c

index c0ef18b23c447bd43ff0bd8f4e30f355ede3899e..6ee115c971c6df0470b52310633eb6c41fa70f9f 100644 (file)
@@ -8,7 +8,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_access.c,v 1.9 2002/03/18 19:14:52 sam Exp $
+ * $Id: dvd_access.c,v 1.10 2002/03/19 12:48:01 gbazin Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -789,6 +789,7 @@ static char * DVDParse( input_thread_t * p_input )
     {
         intf_ErrMsg( "dvd error: cannot stat() device `%s' (%s)",
                      psz_device, strerror(errno));
+        free( psz_device );
         return NULL;                    
     }
     
@@ -797,6 +798,7 @@ static char * DVDParse( input_thread_t * p_input )
     {
         intf_WarnMsg( 3, "input: DVD plugin discarded"
                          " (not a valid block device)" );
+        free( psz_device );
         return NULL;
     }
 #endif
index 4e8d025ea90c4a92f3e47f0e564fa68f781d3345..528271c4cbcab038e15612503c57ee2dee583c32 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_pool.c : management of the pool of decoder threads
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vpar_pool.c,v 1.5 2001/12/30 07:09:56 sam Exp $
+ * $Id: vpar_pool.c,v 1.6 2002/03/19 12:48:01 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -207,6 +207,11 @@ void vpar_EndPool( vpar_thread_t * p_vpar )
 {
     int i;
 
+    for( i = 0; i < 12; i++ )
+    {
+        free( p_vpar->pool.mb.p_idcts[i].pi_block );
+    }
+
     for( i = 0; i < p_vpar->pool.i_smp; i++ )
     {
         int j;
index 9aedf7df22a17da3c72217a3981984476c72223b..87133da889e4f8e51f3b8cdfb828e4afe85de8ae 100644 (file)
@@ -2,7 +2,7 @@
  * waveout.c : Windows waveOut plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: waveout.c,v 1.4 2002/02/24 22:06:50 sam Exp $
+ * $Id: waveout.c,v 1.5 2002/03/19 12:48:01 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *      
@@ -155,7 +155,7 @@ static int aout_SetFormat( aout_thread_t *p_aout )
     if( (p_aout->p_sys->waveformat.nChannels != p_aout->i_channels) ||
         (p_aout->p_sys->waveformat.nSamplesPerSec != p_aout->i_rate) )
     {
-        if( waveOutClose( p_aout->p_sys->h_waveout ) == MMSYSERR_NOERROR )
+        if( waveOutClose( p_aout->p_sys->h_waveout ) != MMSYSERR_NOERROR )
         {
             intf_ErrMsg( "aout error: waveOutClose failed" );
         }
@@ -252,7 +252,7 @@ static void aout_Close( aout_thread_t *p_aout )
     intf_WarnMsg( 3, "aout: waveOut aout_Close ");
 
     /* Close the device */
-    if( waveOutClose( p_aout->p_sys->h_waveout ) == MMSYSERR_NOERROR )
+    if( waveOutClose( p_aout->p_sys->h_waveout ) != MMSYSERR_NOERROR )
     {
         intf_ErrMsg( "aout error: waveOutClose failed" );
     }