Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct H5VL_t ref count on H5O_refresh_metadata failure #4636

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/H5Oflush.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,16 @@ H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid)
connector->nrefs++;

/* Close object & evict its metadata */
if (H5O__refresh_metadata_close(oloc, &obj_loc, oid) < 0)
if (H5O__refresh_metadata_close(oloc, &obj_loc, oid) < 0) {
connector->nrefs--;
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object");
}

/* Re-open the object, re-fetching its metadata */
if (H5O_refresh_metadata_reopen(oid, H5P_DEFAULT, &obj_loc, connector, false) < 0)
if (H5O_refresh_metadata_reopen(oid, H5P_DEFAULT, &obj_loc, connector, false) < 0) {
connector->nrefs--;
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object");
}

/* Restore the number of references on the VOL connector */
connector->nrefs--;
Expand Down
Loading