mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdePkg/Test/DevicePathLib: Remove FreePool(NULL)
Unit test checks if AppendDevicePathInstance() returns NULL. In those cases, AppendDevicePathInstance() does not allocate a device path, so the call to FreePool() must not be performed. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
d5600f4f5a
commit
fadf4f377e
@ -473,11 +473,9 @@ TestAppendDevicePathInstance (
|
||||
|
||||
Appended = AppendDevicePathInstance (NULL, NULL);
|
||||
UT_ASSERT_EQUAL ((uintptr_t)Appended, (uintptr_t)NULL);
|
||||
FreePool (Appended);
|
||||
|
||||
Appended = AppendDevicePathInstance ((EFI_DEVICE_PATH_PROTOCOL *)&mSimpleDevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&mInvalidSimpleDevicePath);
|
||||
UT_ASSERT_EQUAL ((uintptr_t)Appended, (uintptr_t)NULL);
|
||||
FreePool (Appended);
|
||||
|
||||
return UNIT_TEST_PASSED;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user