mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
Fix memleaks (use vlclua_dir_list_free).
This commit is contained in:
parent
588723d7c6
commit
22dbf2bfad
@ -73,16 +73,19 @@ static char *FindFile( const char *psz_name )
|
||||
if( asprintf( &psz_filename, "%s"DIR_SEP"%s.lua", *ppsz_dir,
|
||||
psz_name ) < 0 )
|
||||
{
|
||||
vlclua_dir_list_free( ppsz_dir_list );
|
||||
return NULL;
|
||||
}
|
||||
fp = fopen( psz_filename, "r" );
|
||||
if( fp )
|
||||
{
|
||||
fclose( fp );
|
||||
vlclua_dir_list_free( ppsz_dir_list );
|
||||
return psz_filename;
|
||||
}
|
||||
free( psz_filename );
|
||||
}
|
||||
vlclua_dir_list_free( ppsz_dir_list );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -162,6 +162,7 @@ static int vlclua_datadir_list( lua_State *L )
|
||||
lua_rawseti( L, -2, i );
|
||||
i ++;
|
||||
}
|
||||
vlclua_dir_list_free( ppsz_dir_list );
|
||||
return 1;
|
||||
}
|
||||
/*****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user