diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-08 15:30:10 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-08 15:30:10 (GMT) |
commit | 13d61651f8bfba0739aac1cad17d4b11affb59ae (patch) | |
tree | 78dd33346cc19aa02ade365659e2ba37b62c0d17 /src/H5Fsuper.c | |
parent | 42efc1c2b591e4cd45ec6cb3bdf32044343118d2 (diff) | |
download | hdf5-13d61651f8bfba0739aac1cad17d4b11affb59ae.zip hdf5-13d61651f8bfba0739aac1cad17d4b11affb59ae.tar.gz hdf5-13d61651f8bfba0739aac1cad17d4b11affb59ae.tar.bz2 |
[svn-r18534] Description:
Bring r18446:18533 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Fsuper.c')
-rw-r--r-- | src/H5Fsuper.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index f42c7f6..7ee21f3 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -618,7 +618,8 @@ done: } /* end if */ else /* Free superblock */ - sblock = (H5F_super_t *)H5FL_FREE(H5F_super_t, sblock); + if(H5F_super_free(sblock) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to destroy superblock") /* Reset variables in file structure */ f->shared->sblock = NULL; @@ -664,6 +665,37 @@ done: /*------------------------------------------------------------------------- + * Function: H5F_super_free + * + * Purpose: Destroyer the file's superblock + * + * Return: Success: non-negative on success + * Failure: Negative + * + * Programmer: Quincey Koziol + * April 1, 2010 + * + *------------------------------------------------------------------------- + */ +herr_t +H5F_super_free(H5F_super_t *sblock) +{ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_super_free) + + /* Sanity check */ + HDassert(sblock); + + /* Free root group symbol table entry, if any */ + sblock->root_ent = (H5G_entry_t *)H5MM_xfree(sblock->root_ent); + + /* Free superblock */ + sblock = (H5F_super_t *)H5FL_FREE(H5F_super_t, sblock); + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5F_super_free() */ + + +/*------------------------------------------------------------------------- * Function: H5F_super_size * * Purpose: Get storage size of the superblock and superblock extension |