mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 08:37:41 +00:00
Prevent explicit NULL dereference
This commit is contained in:
parent
56eb09406b
commit
ef1323bbfd
@ -874,17 +874,19 @@ bool core_info_database_supports_content_path(const char *database_path, const c
|
|||||||
{
|
{
|
||||||
const core_info_t *info = &core_info_curr_list->list[i];
|
const core_info_t *info = &core_info_curr_list->list[i];
|
||||||
|
|
||||||
if (!string_list_find_elem(info->supported_extensions_list, path_get_extension(path)))
|
if (!info || !string_list_find_elem(info->supported_extensions_list, path_get_extension(path)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!string_list_find_elem(info->databases_list, database))
|
if (!string_is_empty(database) || !string_list_find_elem(info->databases_list, database))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
free(database);
|
free(database);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(database);
|
if (!string_is_empty(database))
|
||||||
|
free(database);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user