Skip to content

Commit

Permalink
Add a test on H5free_memory
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Jul 11, 2023
1 parent 622b7d3 commit 175a707
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/highfive/H5DataType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ class CompoundType: public DataType {
hid_t member_hid = H5Tget_member_type(_hid, i);
DataType member_type{member_hid};
members.emplace_back(std::string(name), member_type, offset);
H5free_memory(name);
if (H5free_memory(name) < 0) {
throw DataTypeException("Could not free names from the compound datatype");

Check warning on line 248 in include/highfive/H5DataType.hpp

View check run for this annotation

Codecov / codecov/patch

include/highfive/H5DataType.hpp#L248

Added line #L248 was not covered by tests
}
}
}

Expand Down

0 comments on commit 175a707

Please sign in to comment.