summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 4c076f7..947c0fe 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -789,7 +789,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
ohdr_size += layout->storage.u.compact.size;
/* Create an object header for the dataset */
- if(H5O_create(file, dxpl_id, ohdr_size, dset->shared->dcpl_id, oloc/*out*/) < 0)
+ if(H5O_create(file, dxpl_id, ohdr_size, (size_t)1, dset->shared->dcpl_id, oloc/*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header")
HDassert(file == dset->oloc.file);
@@ -1063,6 +1063,8 @@ done:
if(new_dset->shared->type && H5I_dec_ref(new_dset->shared->type_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release datatype")
if(H5F_addr_defined(new_dset->oloc.addr)) {
+ if(H5O_dec_rc_by_loc(&(new_dset->oloc), dxpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL, "unable to decrement refcount on newly created object")
if(H5O_close(&(new_dset->oloc)) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release object header")
if(file) {