Commit 22dbf2bf authored by Rémi Duraffort's avatar Rémi Duraffort

Fix memleaks (use vlclua_dir_list_free).

parent 588723d7
......@@ -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;
}
/*****************************************************************************
......
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