]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its...
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / BdsConnect.c
index 5e7d13fb826ed2b0f530648ae9bb9c36b5a593fe..66b09ee46522c1d413b55f44132ef4e6e686260e 100644 (file)
@@ -176,7 +176,7 @@ BdsLibConnectDevicePath (
   } while (DevicePath != NULL);\r
 \r
   if (CopyOfDevicePath != NULL) {\r
-    SafeFreePool (CopyOfDevicePath);\r
+    FreePool (CopyOfDevicePath);\r
   }\r
   //\r
   // All handle with DevicePath exists in the handle database\r
@@ -220,7 +220,9 @@ BdsLibConnectAllEfi (
     Status = gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);\r
   }\r
 \r
-  SafeFreePool (HandleBuffer);\r
+  if (HandleBuffer != NULL) {\r
+    FreePool (HandleBuffer);\r
+  }\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -263,7 +265,9 @@ BdsLibDisconnectAllEfi (
     Status = gBS->DisconnectController (HandleBuffer[Index], NULL, NULL);\r
   }\r
 \r
-  SafeFreePool (HandleBuffer);\r
+  if (HandleBuffer != NULL) {\r
+    FreePool (HandleBuffer);\r
+  }\r
 \r
   return EFI_SUCCESS;\r
 }\r