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);