]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4Setup.c
Clean up the following module msa files, they are three networt and two PCD modules.
[mirror_edk2.git] / EdkModulePkg / Universal / Network / PxeDhcp4 / Dxe / PxeDhcp4Setup.c
index 09ba041ea63adec5bd0e07ee506d0ce0d77e05d9..88a66d5a53a55499e6aa2afcaff8e278bf8760a9 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
@@ -117,17 +117,7 @@ PxeDhcp4Setup (
   // Allocate data structure.  Return error\r
   // if there is not enough available memory.\r
   //\r
-  EfiStatus = gBS->AllocatePool (\r
-                    EfiBootServicesData,\r
-                    sizeof (EFI_PXE_DHCP4_DATA),\r
-                    (VOID **) &This->Data\r
-                    );\r
-\r
-  if (EFI_ERROR (EfiStatus)) {\r
-    This->Data = NULL;\r
-    return EfiStatus;\r
-  }\r
-\r
+  This->Data = AllocatePool (sizeof (EFI_PXE_DHCP4_DATA));\r
   if (This->Data == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -139,7 +129,7 @@ PxeDhcp4Setup (
 \r
   if (EFI_ERROR (EfiStatus)) {\r
     if (EfiStatus != EFI_ALREADY_STARTED) {\r
-      gBS->FreePool (This->Data);\r
+      FreePool (This->Data);\r
       This->Data = NULL;\r
       Private->PxeBc->Stop (Private->PxeBc);\r
       return EfiStatus;\r