summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-02-25 22:06:18 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-02-25 22:06:18 (GMT)
commit952d00e7f0f49c0895d937a3fed9abed4b25b7e1 (patch)
treefc5172f5729c61ba15c092d6c0e8f177c1d992a6 /src/H5S.c
parent99a3f4d8d4ee1ec3f61a377c1a96a3fe35e9990a (diff)
parentc4044e0c85778e6bd3eda61b7bfdf6bb0fd0a8e9 (diff)
downloadhdf5-952d00e7f0f49c0895d937a3fed9abed4b25b7e1.zip
hdf5-952d00e7f0f49c0895d937a3fed9abed4b25b7e1.tar.gz
hdf5-952d00e7f0f49c0895d937a3fed9abed4b25b7e1.tar.bz2
[svn-r26306] Merge r26296 through 26304 from trunk to vds branch.
It should no longer be necessary to use --enable-using-memchecker make check fails due to an issue with h5ls apparently unrelated to the merge Tested: ummon
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 106d75a..a548f13 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -542,6 +542,10 @@ H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_ma
FUNC_ENTER_NOAPI(FAIL)
+ /* Release destination extent before we copy over it */
+ if(H5S_extent_release(dst) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace extent")
+
/* Copy the regular fields */
dst->type = src->type;
dst->version = src->version;
@@ -616,7 +620,7 @@ H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max)
FUNC_ENTER_NOAPI(NULL)
- if(NULL == (dst = H5FL_MALLOC(H5S_t)))
+ if(NULL == (dst = H5FL_CALLOC(H5S_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the source dataspace's extent */