summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2004-07-20 16:28:56 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2004-07-20 16:28:56 (GMT)
commit7547be91e5d7545dae1db0ee78e4f20661e4bddb (patch)
tree13ebb4293b7a58308d741d26ac1d9cbe98f390ef /src/H5S.c
parent1b0b9048b75f333ff923cb440e30f3d6e1a96c42 (diff)
downloadhdf5-7547be91e5d7545dae1db0ee78e4f20661e4bddb.zip
hdf5-7547be91e5d7545dae1db0ee78e4f20661e4bddb.tar.gz
hdf5-7547be91e5d7545dae1db0ee78e4f20661e4bddb.tar.bz2
[svn-r8900]
Purpose: Bug Fix Description: H5Sset_extent_simple causes errors if used to reduce a space's maxdims to zero. Solution: H5Sset_extent_simple now cleans up the pointer. Added a regression test. Platforms tested: sleipnir (very minor change)
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 64d508d..4c5227c 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1351,6 +1351,9 @@ H5S_set_extent_simple (H5S_t *space, unsigned rank, const hsize_t *dims,
space->extent.max = H5FL_ARR_MALLOC(hsize_t,rank);
HDmemcpy(space->extent.max, max, sizeof(hsize_t) * rank);
} /* end if */
+ else {
+ space->extent.max = NULL;
+ }
}
/* Selection related cleanup */