From 29ad7620aa0b2a6b9c9c1fe429c54aa731be05b7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 19 Jan 2016 01:14:17 +0100 Subject: [PATCH] load_content - call string_list_new later --- content.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content.c b/content.c index ebe635ea15..478933cd89 100644 --- a/content.c +++ b/content.c @@ -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)