summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library/GenericBdsLib/BdsConnect.c')
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsConnect.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c b/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
index 5e7d13fb82..66b09ee465 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
@@ -176,7 +176,7 @@ BdsLibConnectDevicePath (
} while (DevicePath != NULL);
if (CopyOfDevicePath != NULL) {
- SafeFreePool (CopyOfDevicePath);
+ FreePool (CopyOfDevicePath);
}
//
// All handle with DevicePath exists in the handle database
@@ -220,7 +220,9 @@ BdsLibConnectAllEfi (
Status = gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);
}
- SafeFreePool (HandleBuffer);
+ if (HandleBuffer != NULL) {
+ FreePool (HandleBuffer);
+ }
return EFI_SUCCESS;
}
@@ -263,7 +265,9 @@ BdsLibDisconnectAllEfi (
Status = gBS->DisconnectController (HandleBuffer[Index], NULL, NULL);
}
- SafeFreePool (HandleBuffer);
+ if (HandleBuffer != NULL) {
+ FreePool (HandleBuffer);
+ }
return EFI_SUCCESS;
}