From d6b5f922db6628d1433512c901bc476f3f791c99 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Thu, 24 Mar 2022 21:45:19 -0400 Subject: [PATCH] fix memory leak in sz operator --- source/adios2/operator/compress/CompressSZ.cpp | 2 ++ testing/adios2/engine/dataman/TestDataMan2DSz.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/adios2/operator/compress/CompressSZ.cpp b/source/adios2/operator/compress/CompressSZ.cpp index c2fe37468b..3a7ef02442 100644 --- a/source/adios2/operator/compress/CompressSZ.cpp +++ b/source/adios2/operator/compress/CompressSZ.cpp @@ -406,6 +406,7 @@ size_t CompressSZ::DecompressV1(const char *bufferIn, const size_t sizeIn, std::memcpy(dataOut, result, dataSizeBytes); free(result); result = nullptr; + SZ_Finalize(); return dataSizeBytes; } @@ -477,6 +478,7 @@ size_t CompressSZ::DecompressV2(const char *bufferIn, const size_t sizeIn, std::memcpy(dataOut, result, dataSizeBytes); free(result); result = nullptr; + SZ_Finalize(); return dataSizeBytes; } diff --git a/testing/adios2/engine/dataman/TestDataMan2DSz.cpp b/testing/adios2/engine/dataman/TestDataMan2DSz.cpp index adebeaa908..4b6ec25270 100644 --- a/testing/adios2/engine/dataman/TestDataMan2DSz.cpp +++ b/testing/adios2/engine/dataman/TestDataMan2DSz.cpp @@ -311,7 +311,7 @@ TEST_F(DataManEngineTest, 2D_Sz) Dims start = {0, 0}; Dims count = {10, 10}; - size_t steps = 50; + size_t steps = 5000; adios2::Params engineParams = { {"IPAddress", "127.0.0.1"}, {"Port", "12330"}, {"Verbose", "0"}};