From f34abcad3732a166f14dbad6f6ba5a884dc1bbfb Mon Sep 17 00:00:00 2001 From: "systems-assistant[bot]" <221163467+systems-assistant[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 21:17:30 +0530 Subject: [PATCH] SWDEV-548453 - Fix memory leak (#528) --- projects/hip-tests/catch/unit/kernel/hipLaunchKernelEx.cc | 3 +++ 1 file changed, 3 insertions(+) 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); }