summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-04-23 22:24:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-04-23 22:24:38 (GMT)
commitca0a7c164e2e492d5c48d066bacf83a92e675c2e (patch)
tree37c5124c23ceddf677e9e6516e0dde696152655c /src/H5S.c
parenteba569241e9675494bcc7df4d0005b4a75a1d82d (diff)
downloadhdf5-ca0a7c164e2e492d5c48d066bacf83a92e675c2e.zip
hdf5-ca0a7c164e2e492d5c48d066bacf83a92e675c2e.tar.gz
hdf5-ca0a7c164e2e492d5c48d066bacf83a92e675c2e.tar.bz2
[svn-r361] Added Attribute (H5A) code.
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 177b5dc..47a1ac4 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -238,9 +238,7 @@ H5S_close(H5S_t *ds)
break;
case H5S_SIMPLE:
- H5MM_xfree(ds->u.simple.size);
- H5MM_xfree(ds->u.simple.max);
- H5MM_xfree(ds->u.simple.perm);
+ H5S_close_simple(&(ds->u.simple));
break;
case H5S_COMPLEX:
@@ -262,6 +260,37 @@ H5S_close(H5S_t *ds)
}
/*-------------------------------------------------------------------------
+ * Function: H5S_close_simple
+ *
+ * Purpose: Releases all memory associated with a simple data space.
+ * (but doesn't free the simple space itself)
+ *
+ * Return: Success: SUCCEED
+ *
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Friday, April 17, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5S_close_simple(H5S_simple_t *simple)
+{
+ FUNC_ENTER(H5S_close_simple, FAIL);
+
+ assert(simple);
+
+ H5MM_xfree(simple->size);
+ H5MM_xfree(simple->max);
+ H5MM_xfree(simple->perm);
+
+ FUNC_LEAVE(SUCCEED);
+}
+
+/*-------------------------------------------------------------------------
* Function: H5Scopy
*
* Purpose: Copies a dataspace.