SWDEV-447525 - Zero-initialize hipMemPoolProps.

Change-Id: Iee71961bd1d679f0a6a9223e6387748602706c2d
This commit is contained in:
Jaydeep Patel
2024-03-15 12:15:53 +00:00
parent a19e465add
commit b45bc412d7
7 changed files with 39 additions and 38 deletions
+7
View File
@@ -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);