Skip to content

Commit

Permalink
Add forgotten H5Aclose() call
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Dec 4, 2024
1 parent 84b8d83 commit 6ee8426
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/IO/HDF5/HDF5IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions test/SerialIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6ee8426

Please sign in to comment.