summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsMisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkNt32Pkg/Library/EdkGenericBdsLib/BdsMisc.c')
-rw-r--r--EdkNt32Pkg/Library/EdkGenericBdsLib/BdsMisc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsMisc.c b/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsMisc.c
index def3102..b88d051 100644
--- a/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsMisc.c
+++ b/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsMisc.c
@@ -688,7 +688,6 @@ Returns:
DevicePath = Multi;
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
- Size -= sizeof (EFI_DEVICE_PATH_PROTOCOL);
//
// Search for the match of 'Single' in 'Multi'
@@ -698,17 +697,13 @@ Returns:
// If the single device path is found in multiple device paths,
// return success
//
- if (Size == 0) {
- return FALSE;
- }
-
if (CompareMem (Single, DevicePathInst, Size) == 0) {
+ gBS->FreePool (DevicePathInst);
return TRUE;
}
gBS->FreePool (DevicePathInst);
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
- Size -= sizeof (EFI_DEVICE_PATH_PROTOCOL);
}
return FALSE;