summaryrefslogtreecommitdiffstats
path: root/src/H5Flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Flow.c')
-rw-r--r--src/H5Flow.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5Flow.c b/src/H5Flow.c
index 6a7de9c..18cc417 100644
--- a/src/H5Flow.c
+++ b/src/H5Flow.c
@@ -108,8 +108,11 @@ H5F_low_close (H5F_low_t *lf)
{
FUNC_ENTER (H5F_low_close, NULL, NULL);
- if (lf && (lf->type->close)(lf)<0) {
- HRETURN_ERROR (H5E_IO, H5E_CLOSEERROR, NULL); /*close failed*/
+ if (lf) {
+ if ((lf->type->close)(lf)<0) {
+ H5MM_xfree (lf);
+ HRETURN_ERROR (H5E_IO, H5E_CLOSEERROR, NULL); /*close failed*/
+ }
H5MM_xfree (lf);
}