summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2022-02-18 15:28:21 (GMT)
committerGitHub <noreply@github.com>2022-02-18 15:28:21 (GMT)
commit42c419e2661f67a80cef445084d28ac25572244e (patch)
treebd256664cb1a698e092732173aaef53ae67b1a30 /src/H5Ocache.c
parentfeda52b08488dbb3e5b2450f6cd63baa98b0e57e (diff)
downloadhdf5-42c419e2661f67a80cef445084d28ac25572244e.zip
hdf5-42c419e2661f67a80cef445084d28ac25572244e.tar.gz
hdf5-42c419e2661f67a80cef445084d28ac25572244e.tar.bz2
Fix issue with copying null new references (#1440)
* Fix issue with copying null new references. Fix assertion failure when reference copying fails. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index ba47da3..c7586cc 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -346,7 +346,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
done:
/* Release the [possibly partially initialized] object header on errors */
if (!ret_value && oh)
- if (H5O__free(oh) < 0)
+ if (H5O__free(oh, FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data")
FUNC_LEAVE_NOAPI(ret_value)
@@ -639,7 +639,7 @@ H5O__cache_free_icr(void *_thing)
HDassert(oh->cache_info.type == H5AC_OHDR);
/* Destroy object header */
- if (H5O__free(oh) < 0)
+ if (H5O__free(oh, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header")
done:
@@ -1242,7 +1242,7 @@ H5O__prefix_deserialize(const uint8_t *_image, H5O_cache_ud_t *udata)
/* Save the object header for later use in 'deserialize' callback */
udata->oh = oh;
- if (H5O__free(saved_oh) < 0)
+ if (H5O__free(saved_oh, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header")
udata->free_oh = FALSE;
}
@@ -1255,7 +1255,7 @@ H5O__prefix_deserialize(const uint8_t *_image, H5O_cache_ud_t *udata)
done:
/* Release the [possibly partially initialized] object header on errors */
if (ret_value < 0 && oh)
- if (H5O__free(oh) < 0)
+ if (H5O__free(oh, FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header data")
FUNC_LEAVE_NOAPI(ret_value)