Commit 40477740 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Free scandir results when we are done with them. Issue pointed out by...

* Free scandir results when we are done with them. Issue pointed out by jmvallat_vlc at mac dot com.
parent 20993cf2
...@@ -574,6 +574,8 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name, ...@@ -574,6 +574,8 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
if( ppsz_extensions ) free( ppsz_extensions ); if( ppsz_extensions ) free( ppsz_extensions );
if( psz_ignore ) free( psz_ignore ); if( psz_ignore ) free( psz_ignore );
free( pp_dir_content ); for( i = 0; i < i_dir_content; i++ )
if( pp_dir_content[i] ) free( pp_dir_content[i] );
if( pp_dir_content ) free( pp_dir_content );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mvar.c : Variables handling for the HTTP Interface * mvar.c : Variables handling for the HTTP Interface
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2005 the VideoLAN team * Copyright (C) 2001-2005 the VideoLAN team
* $Id: http.c 12225 2005-08-18 10:01:30Z massiot $ * $Id$
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr> * Laurent Aimar <fenrir@via.ecp.fr>
...@@ -632,6 +632,9 @@ mvar_t *E_(mvar_FileSetNew)( intf_thread_t *p_intf, char *name, ...@@ -632,6 +632,9 @@ mvar_t *E_(mvar_FileSetNew)( intf_thread_t *p_intf, char *name,
} }
free( psz_dir ); free( psz_dir );
for( i = 0; i < i_dir_content; i++ )
if( pp_dir_content[i] ) free( pp_dir_content[i] );
if( pp_dir_content) free( pp_dir_content );
return s; return s;
} }
......
...@@ -411,6 +411,10 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path, ...@@ -411,6 +411,10 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
} }
if( i_sub_count >= MAX_SUBTITLE_FILES ) break; if( i_sub_count >= MAX_SUBTITLE_FILES ) break;
free( p_fixed_name ); free( p_fixed_name );
for( a = 0; a < i_dir_content; a++ )
if( pp_dir_content[a] ) free( pp_dir_content[a] );
if( pp_dir_content ) free( pp_dir_content );
} }
} }
if( j >= 0 ) free( *subdirs++ ); if( j >= 0 ) free( *subdirs++ );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment