diff options
Diffstat (limited to 'src/H5S.c')
-rw-r--r-- | src/H5S.c | 35 |
1 files changed, 32 insertions, 3 deletions
@@ -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. |