diff --git a/catch/unit/kernel/hipLaunchKernelEx.cc b/catch/unit/kernel/hipLaunchKernelEx.cc index a41fb2d4b..c7717b8de 100644 --- a/catch/unit/kernel/hipLaunchKernelEx.cc +++ b/catch/unit/kernel/hipLaunchKernelEx.cc @@ -197,6 +197,7 @@ TEST_CASE("Unit_hipLaunchKernelExC_NegetiveTsts") { kernelArgs), hipErrorInvalidConfiguration); } + HIP_CHECK(hipFree(d_output)); } /** * Test Description @@ -264,6 +265,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, @@ -422,6 +424,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); }