summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2020-04-14 17:34:17 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2020-04-14 17:34:17 (GMT)
commit8b475a8a95b35ce7ed468882fac1668bb74b9679 (patch)
tree66d2c7f37b53396433fdd479d2103313aa582eed /src
parent3904f27eadd763b438df241bd97f969746ee4707 (diff)
parent365f08e555e7e92f04b095ccfb3dae09b27fd0ad (diff)
downloadhdf5-8b475a8a95b35ce7ed468882fac1668bb74b9679.zip
hdf5-8b475a8a95b35ce7ed468882fac1668bb74b9679.tar.gz
hdf5-8b475a8a95b35ce7ed468882fac1668bb74b9679.tar.bz2
Merge pull request #2497 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/112_dtype_close_on_error to hdf5_1_12
* commit '365f08e555e7e92f04b095ccfb3dae09b27fd0ad': Fix according to PR feedback. Fix error in previous merge: should use NULL instead of FAIL.
Diffstat (limited to 'src')
-rw-r--r--src/H5Dint.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 173ae3f..73dc526 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1399,7 +1399,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
ret_value = new_dset;
done:
- if(!ret_value && new_dset && new_dset->shared) {
+ if(!ret_value && new_dset) {
if(new_dset->shared) {
if(layout_init)
if(new_dset->shared->layout.ops->dest && (new_dset->shared->layout.ops->dest)(new_dset) < 0)
@@ -1418,18 +1418,16 @@ 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) {
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")
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "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")
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "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")