From bea589553fa9d33168e42bb83b77591fa8a0cad1 Mon Sep 17 00:00:00 2001 From: Amlal Date: Mon, 17 Feb 2025 20:35:53 +0100 Subject: ADD: Patch CountL and CountH in AHCI driver. Signed-off-by: Amlal --- dev/Boot/src/HEL/AMD64/BootEFI.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dev/Boot/src') 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; -- cgit v1.2.3