mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +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];
|
||||
|
||||
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;
|
||||
|
||||
if (!string_list_find_elem(info->databases_list, database))
|
||||
if (!string_is_empty(database) || !string_list_find_elem(info->databases_list, database))
|
||||
continue;
|
||||
|
||||
free(database);
|
||||
return true;
|
||||
}
|
||||
|
||||
free(database);
|
||||
if (!string_is_empty(database))
|
||||
free(database);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user