Browse Source

* fixed two memory leaks


			
			
				pull/2/head
			
			
		
Gildas Bazin 25 years ago
parent
commit
91f8a9a4a7
  1. 4
      plugins/dvd/dvd_access.c
  2. 7
      plugins/mpeg_vdec/vpar_pool.c
  3. 6
      plugins/win32/waveout.c

4
plugins/dvd/dvd_access.c

@ -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

7
plugins/mpeg_vdec/vpar_pool.c

@ -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;

6
plugins/win32/waveout.c

@ -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" );
}

Loading…
Cancel
Save