diff options
-rw-r--r-- | SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c index e0f934bbb4..e2340e6302 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c @@ -3075,16 +3075,17 @@ EFI_STATUS UpdateSecureBootString(
IN SECUREBOOT_CONFIG_PRIVATE_DATA *Private
) {
- EFI_STATUS Status;
UINT8 CurSecureBootMode;
UINT8 *SecureBoot;
+ SecureBoot = NULL;
+
//
// Get current secure boot state.
//
- Status = GetVariable2 (EFI_SECURE_BOOT_MODE_NAME, &gEfiGlobalVariableGuid, (VOID**)&SecureBoot, NULL);
- if (EFI_ERROR(Status)) {
- return Status;
+ GetVariable2 (EFI_SECURE_BOOT_MODE_NAME, &gEfiGlobalVariableGuid, (VOID**)&SecureBoot, NULL);
+ if (SecureBoot == NULL) {
+ return EFI_NOT_FOUND;
}
if (*SecureBoot == SECURE_BOOT_MODE_ENABLE) {
|