summaryrefslogtreecommitdiffstats
path: root/src/H5Adense.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-06-11 21:37:13 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-06-11 21:37:13 (GMT)
commit436250369ae18c957c48c30dd328e68b4594dfce (patch)
treeecf3b5ab202b73ffdc4d638e572bbeecf3f4f52b /src/H5Adense.c
parent48b0ff7724331737140ffae194cb2e741f0b668d (diff)
parent0cf52525d5b45cc7cf6f89267da76b46ffa75f90 (diff)
downloadhdf5-436250369ae18c957c48c30dd328e68b4594dfce.zip
hdf5-436250369ae18c957c48c30dd328e68b4594dfce.tar.gz
hdf5-436250369ae18c957c48c30dd328e68b4594dfce.tar.bz2
Merge pull request #1725 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:h5dump_memory_bug to develop
* commit '0cf52525d5b45cc7cf6f89267da76b46ffa75f90': H5A__free() was renamed to H5A__shared_free() and now requires attr->shared to not be NULL. Fixed a memory issue where unfreed shared attribute dataspace memory tripped an assert in our memory sanity checks. Fixed a memory issue where unfreed shared attribute dataspace memory tripped an assert in our memory sanity checks.
Diffstat (limited to 'src/H5Adense.c')
-rw-r--r--src/H5Adense.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/H5Adense.c b/src/H5Adense.c
index 81e0dc5..bddfe31 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -325,14 +325,11 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
*/
if(*user_attr != NULL) {
H5A_t *old_attr = *user_attr;
- if(old_attr->shared) {
- /* Free any dynamically allocated items */
- if(H5A__free(old_attr) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
- /* Destroy shared attribute struct */
- old_attr->shared = H5FL_FREE(H5A_shared_t, old_attr->shared);
- } /* end if */
+ /* Free any dynamically allocated items */
+ if(old_attr->shared)
+ if(H5A__shared_free(old_attr) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
old_attr = H5FL_FREE(H5A_t, old_attr);
} /* end if */