diff options
author | Quincey Koziol <koziol@koziol.gov> | 2020-04-03 18:47:50 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2020-04-03 18:47:50 (GMT) |
commit | ab89adb58a4781fe6715f17684be282cd9f58fb6 (patch) | |
tree | 3cc388080bb681f7b694cbafe96f0b1f454fd055 /src/H5Dint.c | |
parent | 9e5a68214a5e40bb8e43c5ec2a928dc70e8a6017 (diff) | |
parent | 96ea55b95d2d55cd3409d2caa0bbec80e51d860b (diff) | |
download | hdf5-ab89adb58a4781fe6715f17684be282cd9f58fb6.zip hdf5-ab89adb58a4781fe6715f17684be282cd9f58fb6.tar.gz hdf5-ab89adb58a4781fe6715f17684be282cd9f58fb6.tar.bz2 |
Merge remote-tracking branch 'origin/develop' into pio_update
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r-- | src/H5Dint.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c index 1624f7b..7580505 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -207,6 +207,9 @@ H5D__init_package(void) /* Reset the "default dataset" information */ HDmemset(&H5D_def_dset, 0, sizeof(H5D_shared_t)); + H5D_def_dset.type_id = H5I_INVALID_HID; + H5D_def_dset.dapl_id = H5I_INVALID_HID; + H5D_def_dset.dcpl_id = H5I_INVALID_HID; /* Get the default dataset creation property list values and initialize the * default dataset with them. @@ -1418,8 +1421,18 @@ done: HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, NULL, "unable to reset external file list info") if(new_dset->shared->space && H5S_close(new_dset->shared->space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release dataspace") - 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(new_dset->shared->type) { + if(new_dset->shared->type_id > 0) { + if(H5I_dec_ref(new_dset->shared->type_id) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") + } /* end if */ + else { + if(H5T_close_real(new_dset->shared->type) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") + } /* end else */ + } /* end if */ + if(H5F_addr_defined(new_dset->oloc.addr)) { if(H5O_dec_rc_by_loc(&(new_dset->oloc)) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, NULL, "unable to decrement refcount on newly created object") |