]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c
Clean up the gBS sevice (CopyMem, SetMem, AllocatePool, FreePool) with the correspond...
[mirror_edk2.git] / EdkModulePkg / Universal / DevicePath / Dxe / DevicePathFromText.c
index 3014b200ac641b101c34caf4d77886cc55a80019..94a4a2b5b7127335b9117402823762a10d44ac55 100644 (file)
@@ -2277,10 +2277,10 @@ ConvertTextToDeviceNode (
     DeviceNode = DumpNode (DeviceNodeStr);\r
   } else {\r
     DeviceNode = DumpNode (ParamStr);\r
-    gBS->FreePool (ParamStr);\r
+    FreePool (ParamStr);\r
   }\r
 \r
-  gBS->FreePool (DeviceNodeStr);\r
+  FreePool (DeviceNodeStr);\r
 \r
   return DeviceNode;\r
 }\r
@@ -2346,12 +2346,12 @@ ConvertTextToDevicePath (
       DeviceNode = DumpNode (DeviceNodeStr);\r
     } else {\r
       DeviceNode = DumpNode (ParamStr);\r
-      gBS->FreePool (ParamStr);\r
+      FreePool (ParamStr);\r
     }\r
 \r
     NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);\r
-    gBS->FreePool (DevicePath);\r
-    gBS->FreePool (DeviceNode);\r
+    FreePool (DevicePath);\r
+    FreePool (DeviceNode);\r
     DevicePath = NewDevicePath;\r
 \r
     if (IsInstanceEnd) {\r
@@ -2359,12 +2359,12 @@ ConvertTextToDevicePath (
       SetDevicePathInstanceEndNode (DeviceNode);\r
 \r
       NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);\r
-      gBS->FreePool (DevicePath);\r
-      gBS->FreePool (DeviceNode);\r
+      FreePool (DevicePath);\r
+      FreePool (DeviceNode);\r
       DevicePath = NewDevicePath;\r
     }\r
   }\r
 \r
-  gBS->FreePool (DevicePathStr);\r
+  FreePool (DevicePathStr);\r
   return DevicePath;\r
 }\r