mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-11 16:27:59 +00:00
trivial: uefi: correct a NULL pointer dereference
This could happen if the machine doesn't have `/etc/os-release`.
This commit is contained in:
parent
e888b58ccd
commit
66fcf55f9a
@ -260,7 +260,7 @@ fu_uefi_get_esp_path_for_os (const gchar *base)
|
||||
os_release_id = "unknown";
|
||||
/* if ID key points at something existing return it */
|
||||
esp_path = g_build_filename (base, "EFI", os_release_id, NULL);
|
||||
if (g_file_test (esp_path, G_FILE_TEST_IS_DIR))
|
||||
if (g_file_test (esp_path, G_FILE_TEST_IS_DIR) || os_release == NULL)
|
||||
return g_steal_pointer (&esp_path);
|
||||
/* if ID key doesn't exist, try ID_LIKE */
|
||||
id_like_id = g_hash_table_lookup (os_release, "ID_LIKE");
|
||||
|
Loading…
Reference in New Issue
Block a user