diff options
Diffstat (limited to 'src/H5Aint.c')
-rw-r--r-- | src/H5Aint.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index 81b5c60..b57896e 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -1149,8 +1149,8 @@ H5A_dense_copy_file_cb(const H5A_t *attr_src, void *_udata) HDassert(udata->file); HDassert(udata->cpy_info); - if ( NULL == (attr_dst=H5A_attr_copy_file(attr_src, udata->file, - udata->recompute_size, udata->cpy_info, udata->dxpl_id))) + if(NULL == (attr_dst = H5A_attr_copy_file(attr_src, udata->file, + udata->recompute_size, udata->cpy_info, udata->dxpl_id))) HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") /* Reset shared location information */ @@ -1162,10 +1162,8 @@ H5A_dense_copy_file_cb(const H5A_t *attr_src, void *_udata) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to add to dense storage") done: - if(attr_dst) { - (void)H5A_free(attr_dst); - attr_dst = H5FL_FREE(H5A_t, attr_dst); - } /* end if */ + if(attr_dst && H5A_close(attr_dst) < 0) + HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close destination attribute") FUNC_LEAVE_NOAPI(ret_value) } /* end H5A_dense_copy_file_cb() */ |