mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 10:44:12 +00:00
trivial: Check the return code when using g_file_get_contents()
Not actually a bug, but pointed out by Coverity.
This commit is contained in:
parent
c8c2d60d65
commit
f3b1bc6c0c
@ -315,10 +315,11 @@ fu_provider_uefi_coldplug (FuProvider *provider, GError **error)
|
||||
}
|
||||
|
||||
/* set Display Name to the system for all capsules */
|
||||
g_file_get_contents ("/sys/class/dmi/id/product_name",
|
||||
&display_name, NULL, NULL);
|
||||
if (display_name != NULL)
|
||||
g_strchomp (display_name);
|
||||
if (g_file_get_contents ("/sys/class/dmi/id/product_name",
|
||||
&display_name, NULL, NULL)) {
|
||||
if (display_name != NULL)
|
||||
g_strchomp (display_name);
|
||||
}
|
||||
|
||||
/* add each device */
|
||||
guid = g_strdup ("00000000-0000-0000-0000-000000000000");
|
||||
|
Loading…
Reference in New Issue
Block a user