Skip to content

Commit

Permalink
Fix segfault in H5T__unlock_cb for partially initialized datatypes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed May 2, 2024
1 parent 0da5af4 commit 8329ef3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/H5T.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,9 +1655,8 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_ENTER_PACKAGE_NOERR

assert(dt);
assert(dt->shared);

if (H5T_STATE_IMMUTABLE == dt->shared->state) {
if (dt->shared && (H5T_STATE_IMMUTABLE == dt->shared->state)) {
dt->shared->state = H5T_STATE_RDONLY;
(*n)++;
} /* end if */
Expand Down

0 comments on commit 8329ef3

Please sign in to comment.