summaryrefslogtreecommitdiffhomepage
path: root/dev/Boot/src
diff options
context:
space:
mode:
Diffstat (limited to 'dev/Boot/src')
-rw-r--r--dev/Boot/src/HEL/AMD64/BootEFI.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/dev/Boot/src/HEL/AMD64/BootEFI.cc b/dev/Boot/src/HEL/AMD64/BootEFI.cc
index a8dc5561..b3e03f01 100644
--- a/dev/Boot/src/HEL/AMD64/BootEFI.cc
+++ b/dev/Boot/src/HEL/AMD64/BootEFI.cc
@@ -201,6 +201,11 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr image_handle,
while (BS->AllocatePool(EfiLoaderData, handover_hdr->f_BitMapSize, &handover_hdr->f_BitMapStart) != kEfiOk)
{
+ if (handover_hdr->f_BitMapStart)
+ {
+ BS->FreePool(handover_hdr->f_BitMapStart);
+ handover_hdr->f_BitMapStart = nullptr;
+ }
}
handover_hdr->f_FirmwareCustomTables[0] = (VoidPtr)BS;