diff options
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c index 1348332..508bd6e 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c @@ -521,23 +521,23 @@ BdsDeleteAllInvalidLegacyBootOptions ( return Status;
}
- LegacyBios->GetBbsInfo (
- LegacyBios,
- &HddCount,
- &LocalHddInfo,
- &BbsCount,
- &LocalBbsTable
- );
-
BootOrder = BdsLibGetVariableAndSize (
L"BootOrder",
&gEfiGlobalVariableGuid,
&BootOrderSize
);
if (BootOrder == NULL) {
- BootOrderSize = 0;
+ return EFI_NOT_FOUND;
}
+ LegacyBios->GetBbsInfo (
+ LegacyBios,
+ &HddCount,
+ &LocalHddInfo,
+ &BbsCount,
+ &LocalBbsTable
+ );
+
Index = 0;
while (Index < BootOrderSize / sizeof (UINT16)) {
UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", BootOrder[Index]);
@@ -634,9 +634,7 @@ BdsDeleteAllInvalidLegacyBootOptions ( // Shrinking variable with existing variable implementation shouldn't fail.
//
ASSERT_EFI_ERROR (Status);
- if (BootOrder != NULL) {
- FreePool (BootOrder);
- }
+ FreePool (BootOrder);
return Status;
}
|