load_content - call string_list_new later

This commit is contained in:
twinaphex 2016-01-19 01:14:17 +01:00
parent a79a2d6e1c
commit 29ad7620aa

View File

@ -464,16 +464,15 @@ static bool load_content(const struct retro_subsystem_info *special,
const struct string_list *content)
{
unsigned i;
bool ret = true;
struct string_list* additional_path_allocs = string_list_new();
struct retro_game_info *info = (struct retro_game_info*)
bool ret = true;
struct string_list* additional_path_allocs = NULL;
struct retro_game_info *info = (struct retro_game_info*)
calloc(content->size, sizeof(*info));
if (!info)
{
string_list_free(additional_path_allocs);
return false;
}
additional_path_allocs = string_list_new();
for (i = 0; i < content->size; i++)
{
@ -718,6 +717,7 @@ bool init_content_file(void)
if (!load_content(special, content))
goto error;
global->inited.content = true;
if (content)