Merge /u/xypron/gnu-efi/ branch misc_fixes into master
https://sourceforge.net/p/gnu-efi/code/merge-requests/22/
This commit is contained in:
commit
2a7829c50b
@ -610,6 +610,7 @@ LibReinstallProtocolInterfaces (
|
||||
|
||||
Index += 1;
|
||||
}
|
||||
va_end (args);
|
||||
|
||||
//
|
||||
// If there was an error, undo all the interfaces that were
|
||||
@ -627,7 +628,8 @@ LibReinstallProtocolInterfaces (
|
||||
uefi_call_wrapper(BS->ReinstallProtocolInterface, 4, Handle, Protocol, NewInterface, OldInterface);
|
||||
|
||||
Index -= 1;
|
||||
}
|
||||
}
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -386,7 +386,9 @@ LibInsertToTailOfBootOrder (
|
||||
|
||||
VarSize += sizeof(UINT16);
|
||||
NewBootOptionArray = AllocatePool (VarSize);
|
||||
|
||||
if (!NewBootOptionArray)
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
||||
for (Index = 0; Index < ((VarSize/sizeof(UINT16)) - 1); Index++) {
|
||||
NewBootOptionArray[Index] = BootOptionArray[Index];
|
||||
}
|
||||
@ -403,9 +405,7 @@ LibInsertToTailOfBootOrder (
|
||||
VarSize, (VOID*) NewBootOptionArray
|
||||
);
|
||||
|
||||
if (NewBootOptionArray) {
|
||||
FreePool (NewBootOptionArray);
|
||||
}
|
||||
FreePool (NewBootOptionArray);
|
||||
if (BootOptionArray) {
|
||||
FreePool (BootOptionArray);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user