summaryrefslogtreecommitdiffstats
path: root/src/H5Ocopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Ocopy.c')
-rw-r--r--src/H5Ocopy.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index e0bc7d5..8bdbed5 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -730,17 +730,12 @@ done:
HDfree(deleted);
/* Release pointer to source object header and its derived objects */
- if(oh_src != NULL) {
- /* Unprotect the source object header */
- if(H5AC_unprotect(oloc_src->file, dxpl_id, H5AC_OHDR, oloc_src->addr, oh_src, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- } /* end if */
+ if(oh_src && H5AC_unprotect(oloc_src->file, dxpl_id, H5AC_OHDR, oloc_src->addr, oh_src, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
/* Release pointer to destination object header */
- if(ret_value < 0 && oh_dst) {
- if(H5O_dest(oloc_dst->file, oh_dst) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
- } /* end if */
+ if(ret_value < 0 && oh_dst && H5O_dest(oloc_dst->file, oh_dst) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
/* Release user data for particular type of object to copy */
if(udata) {