From ce9fe34c92c0996e7e55e7520e2c4ec3a30b3315 Mon Sep 17 00:00:00 2001 From: "systems-assistant[bot]" <221163467+systems-assistant[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 12:18:59 -0700 Subject: [PATCH] SWDEV-549705 - Fixed memleak in Unit_hipExtLaunchMultiKernelMultiDevice_Functional (#521) Co-authored-by: Ioannis Assiouras --- .../unit/module/hipExtLaunchMultiKernelMultiDevice.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/hip-tests/catch/unit/module/hipExtLaunchMultiKernelMultiDevice.cc b/projects/hip-tests/catch/unit/module/hipExtLaunchMultiKernelMultiDevice.cc index 2e35715ae8..823032f72a 100644 --- a/projects/hip-tests/catch/unit/module/hipExtLaunchMultiKernelMultiDevice.cc +++ b/projects/hip-tests/catch/unit/module/hipExtLaunchMultiKernelMultiDevice.cc @@ -131,4 +131,14 @@ TEST_CASE("Unit_hipExtLaunchMultiKernelMultiDevice_Functional") { REQUIRE(fabs(C_h[i] - (A_h[i] * A_h[i])) < 0.00000000001); } } + + for (int i = 0; i < nGpu; i++) { + HIP_CHECK(hipFree(A_d[i])); + HIP_CHECK(hipFree(C_d[i])); + HIP_CHECK(hipStreamDestroy(stream[i])); + } + + free(launchParamsList); + free(A_h); + free(C_h); }