Null-check core_info variable before using it

This commit is contained in:
twinaphex 2016-06-02 20:58:42 +02:00
parent 79c94513ec
commit 1156406dfc
1 changed files with 6 additions and 0 deletions

View File

@ -234,6 +234,9 @@ struct string_list *string_list_new_special(enum string_list_type type,
core_info_list_get_supported_cores(core_info_list,
(const char*)data, &core_info, list_size);
if (!core_info)
goto error;
if (*list_size == 0)
goto error;
@ -255,6 +258,9 @@ struct string_list *string_list_new_special(enum string_list_type type,
core_info_list_get_supported_cores(core_info_list,
(const char*)data, &core_info, list_size);
if (!core_info)
goto error;
if (*list_size == 0)
goto error;