diff options
Diffstat (limited to 'src/H5Gtraverse.c')
-rw-r--r-- | src/H5Gtraverse.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 61c08fa..742e2bc 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -807,6 +807,17 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, if(grp_loc.oloc->holding_file) if(H5O_loc_hold_file(obj_loc.oloc) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open") + + /* Reset any non-default object header messages */ + if(ginfo != &def_ginfo) + if(H5O_msg_reset(H5O_GINFO_ID, ginfo) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset group info message") + if(linfo != &def_linfo) + if(H5O_msg_reset(H5O_LINFO_ID, linfo) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link info message") + if(pline != &def_pline) + if(H5O_msg_reset(H5O_PLINE_ID, pline) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset I/O pipeline message") } /* end if */ else HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found") @@ -857,7 +868,8 @@ done: /* If there's valid information in the link, reset it */ if(link_valid) - H5O_msg_reset(H5O_LINK_ID, &lnk); + if(H5O_msg_reset(H5O_LINK_ID, &lnk) < 0) + HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link message") FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_traverse_real() */ |