]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_loadfile.c
Clean up the following module msa files, they are three networt and two PCD modules.
[mirror_edk2.git] / EdkModulePkg / Universal / Network / PxeBc / Dxe / pxe_loadfile.c
index 6659bc4022cb08d880179d6191e125ea0e88a464..3dceefb945cd275fd688743365c045cb7ca349a3 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -1168,14 +1168,9 @@ Returns:
     //\r
     // Allocate credential file buffer.\r
     //\r
-    Status = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    (UINTN) CredentialLen,\r
-                    &CredentialBuffer\r
-                    );\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      return Status;\r
+    CredentialBuffer = AllocatePool ((UINTN) CredentialLen);\r
+    if (CredentialBuffer == NULL) {\r
+      return EFI_OUT_OF_RESOURCES;\r
     }\r
     //\r
     // Download credential file.\r
@@ -1196,7 +1191,7 @@ Returns:
                               );\r
 \r
     if (EFI_ERROR (Status)) {\r
-      gBS->FreePool (CredentialBuffer);\r
+      FreePool (CredentialBuffer);\r
       return Status;\r
     }\r
     //\r
@@ -1211,7 +1206,7 @@ Returns:
       Status = EFI_PROTOCOL_ERROR;\r
     }\r
 \r
-    gBS->FreePool (CredentialBuffer);\r
+    FreePool (CredentialBuffer);\r
   }\r
 \r
   return Status;\r