Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into locking_protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
qkoziol committed Oct 31, 2024
2 parents 5226226 + e8257bd commit 84ae455
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/H5B.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out
/*
* Allocate file and memory data structures.
*/
if (NULL == (bt = H5FL_MALLOC(H5B_t)))
if (NULL == (bt = H5FL_CALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node");
memset(&bt->cache_info, 0, sizeof(H5AC_info_t));
bt->level = 0;
Expand Down
9 changes: 6 additions & 3 deletions src/H5T.c
Original file line number Diff line number Diff line change
Expand Up @@ -4140,7 +4140,8 @@ H5T__free(H5T_t *dt)
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
dt->shared->u.compnd.memb[i].name = (char *)H5MM_xfree(dt->shared->u.compnd.memb[i].name);
if (H5T_close_real(dt->shared->u.compnd.memb[i].type) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL,
/* Push errors, but keep going */
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL,
"unable to close datatype for compound member");
}
dt->shared->u.compnd.memb = (H5T_cmemb_t *)H5MM_xfree(dt->shared->u.compnd.memb);
Expand Down Expand Up @@ -4177,12 +4178,14 @@ H5T__free(H5T_t *dt)
/* Close the parent */
assert(dt->shared->parent != dt);
if (dt->shared->parent && H5T_close_real(dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type");
/* Push errors, but keep going */
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type");
dt->shared->parent = NULL;

/* Close the owned VOL object */
if (dt->shared->owned_vol_obj && H5VL_free_object(dt->shared->owned_vol_obj) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object");
/* Push errors, but keep going */
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object");
dt->shared->owned_vol_obj = NULL;

done:
Expand Down

0 comments on commit 84ae455

Please sign in to comment.