SWDEV-447525 - Zero-initialize hipMemPoolProps.
Change-Id: Iee71961bd1d679f0a6a9223e6387748602706c2d
This commit is contained in:
@@ -57,6 +57,13 @@ TEST_CASE("Unit_hipMemPoolDestroy_Negative_Parameter") {
|
||||
}
|
||||
|
||||
SECTION("Double hipMemPoolDestroy") {
|
||||
hipMemPoolProps kPoolProps;
|
||||
memset(&kPoolProps, 0, sizeof(kPoolProps));
|
||||
kPoolProps.allocType = hipMemAllocationTypePinned;
|
||||
kPoolProps.handleTypes = hipMemHandleTypeNone;
|
||||
kPoolProps.location.type = hipMemLocationTypeDevice;
|
||||
kPoolProps.location.id = 0;
|
||||
kPoolProps.win32SecurityAttributes = nullptr;
|
||||
HIP_CHECK(hipMemPoolCreate(&mem_pool, &kPoolProps));
|
||||
HIP_CHECK(hipMemPoolDestroy(mem_pool));
|
||||
HIP_CHECK_ERROR(hipMemPoolDestroy(mem_pool), hipErrorInvalidValue);
|
||||
|
||||
Reference in New Issue
Block a user