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:
b'Nigel Croxon 2021-06-23 15:18:12 +00:00
commit 2a7829c50b
3 changed files with 8 additions and 6 deletions

View File

@ -610,6 +610,7 @@ LibReinstallProtocolInterfaces (
Index += 1;
}
va_end (args);
//
// If there was an error, undo all the interfaces that were
@ -628,6 +629,7 @@ LibReinstallProtocolInterfaces (
Index -= 1;
}
va_end (args);
}
//

View File

@ -386,6 +386,8 @@ 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);
}
if (BootOptionArray) {
FreePool (BootOptionArray);
}

View File

@ -305,7 +305,7 @@ Atoi (
CHAR16 c;
// skip preceeding white space
while (*str && *str == ' ') {
while (*str == ' ') {
str += 1;
}