trivial: uefi: Only set EFI variables on real systems

Avoids copying from a NULL pointer.
Caught via clang static analysis
This commit is contained in:
Mario Limonciello 2018-09-20 23:08:50 -05:00 committed by Richard Hughes
parent 981ee65554
commit 6ed307c5fb

View File

@ -339,7 +339,6 @@ fu_uefi_device_write_firmware (FuDevice *device, GBytes *fw, GError **error)
fu_uefi_prefix_efi_errors (error);
return FALSE;
}
}
/* save this header and body to the hardware */
datasz = sizeof(info) + dp_bufsz;
@ -350,6 +349,7 @@ fu_uefi_device_write_firmware (FuDevice *device, GBytes *fw, GError **error)
fu_uefi_prefix_efi_errors (error);
return FALSE;
}
}
/* update the firmware before the bootloader runs */
if (fu_device_get_metadata_boolean (device, "RequireShimForSecureBoot"))