summaryrefslogtreecommitdiffstats
path: root/src/H5FS.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FS.c')
-rw-r--r--src/H5FS.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/H5FS.c b/src/H5FS.c
index 5e3392e..015c485 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -508,7 +508,7 @@ H5FS_t *
H5FS_new(size_t nclasses, const H5FS_section_class_t *classes[],
void *cls_init_udata)
{
- H5FS_t *fspace; /* Free space manager */
+ H5FS_t *fspace = NULL; /* Free space manager */
size_t u; /* Local index variable */
H5FS_t *ret_value; /* Return value */
@@ -556,6 +556,16 @@ H5FS_new(size_t nclasses, const H5FS_section_class_t *classes[],
ret_value = fspace;
done:
+ if(!ret_value)
+ if(fspace) {
+ /* Should probably call the class 'term' callback for all classes
+ * that have had their 'init' callback called... -QAK
+ */
+ if(fspace->sect_cls)
+ fspace->sect_cls = (H5FS_section_class_t *)H5FL_SEQ_FREE(H5FS_section_class_t, fspace->sect_cls);
+ fspace = H5FL_FREE(H5FS_t, fspace);
+ } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_new() */