]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Roll back change r10695, because new update on r10700 and r10701 handles this issue.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 28 Jul 2010 01:43:18 +0000 (01:43 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 28 Jul 2010 01:43:18 +0000 (01:43 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10704 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/DxeServicesLib/DxeServicesLib.c
MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.c

index 9cf845d6fc1bac276ea94401f66b2cf66ec8039b..d8e6b5cc4e404ccd86fa663d04fdeb9e860d0353 100644 (file)
@@ -122,7 +122,6 @@ InternalGetSectionFromFv (
   EFI_STATUS                    Status;\r
   EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;\r
   UINT32                        AuthenticationStatus;\r
-  VOID*                         TempBuffer;\r
 \r
   ASSERT (NameGuid != NULL);\r
   ASSERT (Buffer != NULL);\r
@@ -171,17 +170,6 @@ InternalGetSectionFromFv (
                     );\r
   }\r
 \r
-  if (!EFI_ERROR (Status)) {\r
-    //\r
-    // The found buffer by FV protocol is allocated by gBS AllocatePool() service. \r
-    // Copy the found buffer to the allocated buffer by AllocatePool().\r
-    // So, the returned buffer can be freed by FreePool().\r
-    //\r
-    TempBuffer = AllocateCopyPool (*Size, *Buffer);\r
-    gBS->FreePool (*Buffer);\r
-    *Buffer = TempBuffer;\r
-  }\r
-\r
   return Status;\r
 }\r
 \r
@@ -324,11 +312,7 @@ GetSectionFromAnyFvByFileType  (
 \r
 Done:\r
   if (HandleBuffer != NULL) {  \r
-    //\r
-    // HandleBuffer is allocated by gBS AllocatePool() service. \r
-    // So, gBS FreePool() service is used to free HandleBuffer.\r
-    //\r
-    gBS->FreePool (HandleBuffer);\r
+    FreePool(HandleBuffer);\r
   }\r
 \r
   return Status;\r
@@ -451,12 +435,8 @@ GetSectionFromAnyFv  (
 \r
 Done:\r
   \r
-  if (HandleBuffer != NULL) {\r
-    //\r
-    // HandleBuffer is allocated by gBS AllocatePool() service. \r
-    // So, gBS FreePool() service is used to free HandleBuffer.\r
-    //\r
-    gBS->FreePool (HandleBuffer);\r
+  if (HandleBuffer != NULL) {  \r
+    FreePool(HandleBuffer);\r
   }\r
   return Status;\r
   \r
@@ -635,7 +615,6 @@ GetFileBufferByFilePath (
   EFI_FIRMWARE_VOLUME2_PROTOCOL     *FwVol;\r
   EFI_SECTION_TYPE                  SectionType;\r
   UINT8                             *ImageBuffer;\r
-  UINT8                             *TempBuffer;\r
   UINTN                             ImageBufferSize;\r
   EFI_FV_FILETYPE                   Type;\r
   EFI_FV_FILE_ATTRIBUTES            Attrib;\r
@@ -663,7 +642,6 @@ GetFileBufferByFilePath (
   FileInfo            = NULL;\r
   FileHandle          = NULL;\r
   ImageBuffer         = NULL;\r
-  TempBuffer          = NULL;\r
   ImageBufferSize     = 0;\r
   *AuthenticationStatus = 0;\r
   \r
@@ -724,16 +702,6 @@ GetFileBufferByFilePath (
                             AuthenticationStatus\r
                             );\r
         }\r
-        if (!EFI_ERROR (Status)) {\r
-          //\r
-          // The found buffer by FV protocol is allocated by gBS AllocatePool() service. \r
-          // Copy the found buffer to the allocated buffer by AllocatePool().\r
-          // Then, this returned buffer can be freed by FreePool().\r
-          //\r
-          TempBuffer = AllocateCopyPool (ImageBufferSize, ImageBuffer);\r
-          gBS->FreePool (ImageBuffer);\r
-          ImageBuffer = TempBuffer;\r
-        }\r
       }\r
     }\r
     goto Finish;\r
index d6527ef3019c7ff70a0d5273fc1e3b3112c6153c..ccd9df34d09b35a941de4964eb10461624425cb9 100644 (file)
@@ -96,11 +96,7 @@ PciSegmentLibConstructor (
     ASSERT (Descriptors->Desc != ACPI_END_TAG_DESCRIPTOR);\r
   }\r
 \r
-  //\r
-  // HandleBuffer is allocated by gBS AllocatePool() service. \r
-  // So, gBS FreePool() service is used to free HandleBuffer.\r
-  //\r
-  gBS->FreePool (HandleBuffer);\r
+  FreePool(HandleBuffer);\r
 \r
   return EFI_SUCCESS;\r
 }\r