diff options
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r-- | src/H5Dint.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c index 27072ab..537b7ed 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2686,7 +2686,6 @@ hid_t H5D_get_type(H5D_t *dset) { H5T_t *dt = NULL; - H5T_t *type = NULL; hid_t ret_value = FAIL; FUNC_ENTER_NOAPI_NOINIT @@ -2712,14 +2711,7 @@ H5D_get_type(H5D_t *dset) /* If this is a committed datatype, we need to recreate the two level IDs, where the VOL object is a copy of the returned datatype */ - - /* Copy the dataset's datatype */ - if(NULL == (type = H5T_copy(dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype") - - H5T_set_vol_object(type, (void *)dt); - - if((ret_value = H5VL_native_register(H5I_DATATYPE, type, TRUE)) < 0) + if((ret_value = H5VL_native_register(H5I_DATATYPE, dt, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype") } else { @@ -2730,8 +2722,6 @@ done: if(ret_value < 0) { if(dt && H5T_close(dt) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") - if(type && H5T_close(type) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") } /* end if */ FUNC_LEAVE_NOAPI(ret_value) |