]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
Update network drivers to use FreePool() instead of gBS->FreePool().
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4ConfigDxe / Ip4Config.c
index fa0445e2470dbea9bfb4f5897237a3bf4d6437d9..5f8821a4d6821da76984055d53f686806a3c5998 100644 (file)
@@ -49,7 +49,7 @@ Ip4ConfigGetNicInfo (
   Config = Ip4ConfigFindNicVariable (Variable, NicAddr);\r
 \r
   if (Config == NULL) {\r
-    gBS->FreePool (Variable);\r
+    FreePool (Variable);\r
     return NULL;\r
   }\r
 \r
@@ -62,14 +62,14 @@ Ip4ConfigGetNicInfo (
     Ip4ConfigWriteVariable (NewVariable);\r
 \r
     if (NewVariable != NULL) {\r
-      gBS->FreePool (NewVariable);\r
+      FreePool (NewVariable);\r
     };\r
 \r
-    gBS->FreePool (Config);\r
+    FreePool (Config);\r
     Config = NULL;\r
   }\r
 \r
-  gBS->FreePool (Variable);\r
+  FreePool (Variable);\r
   return Config;\r
 }\r
 \r
@@ -131,7 +131,7 @@ EfiNicIp4ConfigGetInfo (
 \r
   *ConfigLen = Len;\r
 \r
-  gBS->FreePool (Config);\r
+  FreePool (Config);\r
   return Status;\r
 }\r
 \r
@@ -200,14 +200,14 @@ EfiNicIp4ConfigSetInfo (
   Status      = Ip4ConfigWriteVariable (NewVariable);\r
 \r
   if (NewVariable != NULL) {\r
-    gBS->FreePool (NewVariable);\r
+    FreePool (NewVariable);\r
   }\r
 \r
   //\r
   // Variable is NULL when saving the first configure parameter\r
   //\r
   if (Variable != NULL) {\r
-    gBS->FreePool (Variable);\r
+    FreePool (Variable);\r
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -277,7 +277,7 @@ Ip4ConfigOnDhcp4Complete (
     if (Instance->NicConfig != NULL) {\r
       ASSERT (Instance->NicConfig->Source == IP4_CONFIG_SOURCE_DHCP);\r
       Perment = Instance->NicConfig->Perment;\r
-      gBS->FreePool (Instance->NicConfig);\r
+      FreePool (Instance->NicConfig);\r
     }\r
 \r
     Instance->NicConfig = AllocatePool (sizeof (NIC_IP4_CONFIG_INFO) + 2* sizeof (EFI_IP4_ROUTE_TABLE));\r
@@ -741,7 +741,7 @@ Ip4ConfigCleanConfig (
   )\r
 {\r
   if (Instance->NicConfig != NULL) {\r
-    gBS->FreePool (Instance->NicConfig);\r
+    FreePool (Instance->NicConfig);\r
     Instance->NicConfig = NULL;\r
   }\r
 \r