diff --git a/projects/hip-tests/catch/unit/kernel/hipLaunchKernelEx.cc b/projects/hip-tests/catch/unit/kernel/hipLaunchKernelEx.cc index c57d0e1a49..7d17a82127 100644 --- a/projects/hip-tests/catch/unit/kernel/hipLaunchKernelEx.cc +++ b/projects/hip-tests/catch/unit/kernel/hipLaunchKernelEx.cc @@ -192,6 +192,7 @@ TEST_CASE("Unit_hipLaunchKernelExC_NegetiveTsts") { HIP_CHECK_ERROR(hipLaunchKernelExC(&invalidConfig, (void*)cooperativeKernelExC, kernelArgs), hipErrorInvalidConfiguration); } + HIP_CHECK(hipFree(d_output)); } /** * Test Description @@ -257,6 +258,7 @@ TEST_CASE("Unit_hipLaunchKernelEx_NegetiveTsts") { d_output, totalThreads), hipErrorInvalidConfiguration); } + HIP_CHECK(hipFree(d_output)); } bool runTest(const char* testName, const void* kernelFunc, int totalThreads, int blockSize, @@ -405,6 +407,7 @@ TEST_CASE("Unit_hipLaunchKernelEx_With_Different_Kernels") { int result = 0; HIP_CHECK(hipMemcpy(&result, devMem, sizeof(result), hipMemcpyDefault)); + HIP_CHECK(hipFree(devMem)); REQUIRE(result == 100); }