From 79f752d2319b2dc854a9a1b27228a7b6b23984f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Wed, 4 Dec 2024 11:22:32 +0100 Subject: [PATCH] Add forgotten H5Aclose() call --- src/IO/HDF5/HDF5IOHandler.cpp | 6 ++++++ test/SerialIOTest.cpp | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/IO/HDF5/HDF5IOHandler.cpp b/src/IO/HDF5/HDF5IOHandler.cpp index aed0042b04..874768adbe 100644 --- a/src/IO/HDF5/HDF5IOHandler.cpp +++ b/src/IO/HDF5/HDF5IOHandler.cpp @@ -1739,6 +1739,12 @@ void HDF5IOHandlerImpl::writeAttribute( "during attribute write"); if (equal == 0) // unequal { + status = H5Aclose(attribute_id); + VERIFY( + status == 0, + "[HDF5] Internal error: Failed to close previous HDF5 " + "attribute " + "during attribute write"); status = H5Adelete(node_id, name.c_str()); VERIFY( status == 0, diff --git a/test/SerialIOTest.cpp b/test/SerialIOTest.cpp index 4a9bc2b6c2..325cab4031 100644 --- a/test/SerialIOTest.cpp +++ b/test/SerialIOTest.cpp @@ -7571,9 +7571,6 @@ void groupbased_read_write(std::string const &ext) read.close(); } - return; - std::cout << "Now truncate " << filename << std::endl; - // check that truncation works correctly { Series write(filename, Access::CREATE);