summaryrefslogtreecommitdiffstats
path: root/src/H5Rint.c
diff options
context:
space:
mode:
authorJacob Smith <jake.smith@hdfgroup.org>2020-04-07 15:22:21 (GMT)
committerJacob Smith <jake.smith@hdfgroup.org>2020-04-07 15:29:00 (GMT)
commit075e74e9b2e2ad761af44237aa78acc6ff3c3c24 (patch)
tree8511d081cc709a57790b4e92eb75571352ef40d3 /src/H5Rint.c
parentd97c00013dd5b13b618d08d9b6d6517176674a4e (diff)
parentb27a20f8c0e286ea7c2836605632ea2ee5522d03 (diff)
downloadhdf5-075e74e9b2e2ad761af44237aa78acc6ff3c3c24.zip
hdf5-075e74e9b2e2ad761af44237aa78acc6ff3c3c24.tar.gz
hdf5-075e74e9b2e2ad761af44237aa78acc6ff3c3c24.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into feature/vfd_splitter_mirror_a
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r--src/H5Rint.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 1df8a20..30f3dbb 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -1768,6 +1768,7 @@ H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf,
H5O_token_t token = { 0 };
size_t data_size;
const uint8_t *p;
+ H5S_t *space = NULL;
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -1788,7 +1789,6 @@ H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf,
if(space_ptr) {
H5O_loc_t oloc; /* Object location */
- H5S_t *space = NULL;
/* Initialize the object location */
H5O_loc_reset(&oloc);
@@ -1812,6 +1812,12 @@ H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf,
done:
H5MM_free(data);
+
+ if(ret_value < 0) {
+ if(space && H5S_close(space) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
+ }
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__decode_token_region_compat() */