summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Dchunk.c2
-rw-r--r--src/H5Dio.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 46925a1..af888a9 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -974,7 +974,7 @@ H5D_free_chunk_info(void *item, void UNUSED *key, void UNUSED *opdata)
H5S_select_all(chunk_info->fspace, TRUE);
/* Close the chunk's memory dataspace, if it's not shared */
- if(!chunk_info->mspace_shared)
+ if(!chunk_info->mspace_shared && chunk_info->mspace)
(void)H5S_close(chunk_info->mspace);
/* Free the actual chunk info */
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 248ea9e..ef826fe 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -657,6 +657,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
#endif /*H5_HAVE_PARALLEL*/
/* Call storage method's I/O initialization routine */
+ HDmemset(&fm, 0, sizeof(H5D_chunk_map_t));
if(io_info.layout_ops.io_init && (*io_info.layout_ops.io_init)(&io_info, &type_info, nelmts, file_space, mem_space, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info")
io_op_init = TRUE;