From bca7f67a2ff05bcf5e1d919c9aac7603a214add2 Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Thu, 26 Sep 2024 12:18:07 +0100 Subject: [PATCH] SWDEV-487632,SWDEV-487634 - Fixed memleak in Unit_hipDrvMemcpy_Functional Change-Id: If515c0f31acb5ca071f575458ef9eb06c5786df2 [ROCm/hip-tests commit: e248f1072ad4d784924a02d4239d93ebd7c969f7] --- projects/hip-tests/catch/unit/context/hipDrvMemcpy.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/hip-tests/catch/unit/context/hipDrvMemcpy.cc b/projects/hip-tests/catch/unit/context/hipDrvMemcpy.cc index 9e0b1e8062..8d2a25382f 100644 --- a/projects/hip-tests/catch/unit/context/hipDrvMemcpy.cc +++ b/projects/hip-tests/catch/unit/context/hipDrvMemcpy.cc @@ -54,7 +54,13 @@ TEST_CASE("Unit_hipDrvMemcpy_Functional") { HIP_CHECK(hipStreamSynchronize(stream)); HIP_CHECK(hipMemcpyDtoHAsync(Bh, Bd, SIZE, stream)); HIP_CHECK(hipStreamSynchronize(stream)); + HIP_CHECK(hipStreamDestroy(stream)); + HIP_CHECK(hipFree(Ad)); + HIP_CHECK(hipFree(Bd)); + REQUIRE(Ah[10] == Bh[10]); + HIP_CHECK(hipFreeHost(Ah)); + HIP_CHECK(hipFreeHost(Bh)); delete[] A; delete[] B; }