diff --git a/gnu-efi-3.0/lib/hand.c b/gnu-efi-3.0/lib/hand.c index 6864765..15377d4 100644 --- a/gnu-efi-3.0/lib/hand.c +++ b/gnu-efi-3.0/lib/hand.c @@ -488,7 +488,7 @@ LibInstallProtocolInterfaces ( Index += 1; } - + va_end(args); // // If there was an error, remove all the interfaces that were // installed without any errors @@ -504,7 +504,7 @@ LibInstallProtocolInterfaces ( Index -= 1; } - + va_end(args); *Handle = OldHandle; } @@ -552,6 +552,7 @@ LibUninstallProtocolInterfaces ( DEBUG((D_ERROR, "LibUninstallProtocolInterfaces: failed %g, %r\n", Protocol, Handle)); } } + va_end(args); } @@ -607,7 +608,7 @@ LibReinstallProtocolInterfaces ( Index += 1; } - + va_end(args); // // If there was an error, undo all the interfaces that were // reinstalled without any errors @@ -624,7 +625,8 @@ LibReinstallProtocolInterfaces ( uefi_call_wrapper(BS->ReinstallProtocolInterface, 4, Handle, Protocol, NewInterface, OldInterface); Index -= 1; - } + } + va_end(args); } // diff --git a/gnu-efi-3.0/lib/misc.c b/gnu-efi-3.0/lib/misc.c index fdcc934..f6bb6f5 100644 --- a/gnu-efi-3.0/lib/misc.c +++ b/gnu-efi-3.0/lib/misc.c @@ -403,9 +403,7 @@ LibInsertToTailOfBootOrder ( VarSize, (VOID*) NewBootOptionArray ); - if (NewBootOptionArray) { - FreePool (NewBootOptionArray); - } + FreePool (NewBootOptionArray); if (BootOptionArray) { FreePool (BootOptionArray); }