Null-check core_info variable before using it
This commit is contained in:
parent
79c94513ec
commit
1156406dfc
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue