summaryrefslogtreecommitdiffstats
path: root/src/H5Gcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gcache.c')
-rw-r--r--src/H5Gcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index 8dfecb1..f765b41 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -316,8 +316,10 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len,
if(H5G__ent_encode_vec(f, &image, sym->entry, sym->nsyms) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize")
+#ifdef H5_CLEAR_MEMORY
/* Clear rest of symbol table node */
- HDmemset(image, 0, sym->node_size - (size_t)(image - (uint8_t *)_image));
+ HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+#endif /* H5_CLEAR_MEMORY */
done:
FUNC_LEAVE_NOAPI(ret_value)