} 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
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
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