summaryrefslogtreecommitdiffstats
path: root/src/H5Cimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Cimage.c')
-rw-r--r--src/H5Cimage.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index 87df542..c578deb 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -654,6 +654,11 @@ H5C__load_cache_image(H5F_t *f)
} /* end if */
done:
+ if (ret_value < 0) {
+ if (H5_addr_defined(cache_ptr->image_addr))
+ cache_ptr->image_buffer = H5MM_xfree(cache_ptr->image_buffer);
+ }
+
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__load_cache_image() */