X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FUniversal%2FFirmwareVolume%2FGuidedSectionExtraction%2FCrc32SectionExtract%2FDxe%2FCrc32SectionExtract.c;h=de9ba8372f38c37149a48d9dc797b33e8010ec02;hp=7e196d6453cb8beb3d8326b69d33e5a660bc75df;hb=8d8daecb5435d879c1b1244d51876f37359759a3;hpb=09caf4071e9224b5a778a7d31c7875af4a0736ba diff --git a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c index 7e196d6453..de9ba8372f 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c +++ b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,8 +18,7 @@ Abstract: Implements GUIDed section extraction protocol interface with a specific GUID: CRC32. - Please refer to the Tiano File Image Format Specification, - FV spec 0.3.6 + Please refer to the Framewokr Firmware Volume Specification 0.9. --*/ @@ -68,7 +67,7 @@ Returns: ); if (EFI_ERROR (Status)) { if (Crc32GuidedSep != NULL) { - gBS->FreePool (Crc32GuidedSep); + FreePool (Crc32GuidedSep); } return Status; @@ -84,7 +83,7 @@ Returns: Crc32GuidedSep ); if (EFI_ERROR (Status)) { - gBS->FreePool (Crc32GuidedSep); + FreePool (Crc32GuidedSep); return EFI_LOAD_ERROR; } @@ -199,8 +198,8 @@ Crc32ExtractSection ( Image = (UINT8 *) InputSection + (UINT32) (GuidedSectionHeader->DataOffset); *OutputSize = GetSectionLength ((EFI_COMMON_SECTION_HEADER *) InputSection) - (UINT32) GuidedSectionHeader->DataOffset; - Status = gBS->AllocatePool (EfiBootServicesData, *OutputSize, OutputBuffer); - if (EFI_ERROR (Status)) { + *OutputBuffer = AllocatePool (*OutputSize); + if (*OutputBuffer == NULL) { return EFI_OUT_OF_RESOURCES; } //