diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2024-10-23 18:45:41 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-11-08 17:22:14 +0000 |
commit | fadf4f377e86aebf64bfc0c57cdcfe5e70f04443 (patch) | |
tree | 679ea62342e7c51bb5e672440218ed0b4d5e0adb /MdePkg | |
parent | d5600f4f5a9116c2fc0dd0daf3304477603dbf3f (diff) | |
download | edk2-fadf4f377e86aebf64bfc0c57cdcfe5e70f04443.tar.gz edk2-fadf4f377e86aebf64bfc0c57cdcfe5e70f04443.tar.bz2 edk2-fadf4f377e86aebf64bfc0c57cdcfe5e70f04443.zip |
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>
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Test/UnitTest/Library/DevicePathLib/TestDevicePathLib.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/MdePkg/Test/UnitTest/Library/DevicePathLib/TestDevicePathLib.c b/MdePkg/Test/UnitTest/Library/DevicePathLib/TestDevicePathLib.c index 687497278c..52e2322c1a 100644 --- a/MdePkg/Test/UnitTest/Library/DevicePathLib/TestDevicePathLib.c +++ b/MdePkg/Test/UnitTest/Library/DevicePathLib/TestDevicePathLib.c @@ -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;
}
|