diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2018-12-19 04:30:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2018-12-19 04:30:12 (GMT) |
commit | b61ad0f7b68f974356a33b335e94e21a941c0621 (patch) | |
tree | c30308297c83b1009ffa36ed085a20f8f8c6f803 /src/H5FDmulti.c | |
parent | bd096066c3d9613fcece7450f8628a3a660b6b4f (diff) | |
download | hdf5-b61ad0f7b68f974356a33b335e94e21a941c0621.zip hdf5-b61ad0f7b68f974356a33b335e94e21a941c0621.tar.gz hdf5-b61ad0f7b68f974356a33b335e94e21a941c0621.tar.bz2 |
Clear driver properties before returning them to application.
Move write_tracking and page_size properties to be inside the core VFD's
driver properties.
Diffstat (limited to 'src/H5FDmulti.c')
-rw-r--r-- | src/H5FDmulti.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index aa1b118..e8dde50 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -497,6 +497,7 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, * Initialize driver specific information. No need to copy it into the FA * struct since all members will be copied by H5Pset_driver(). */ + memset(&fa, 0, sizeof(H5FD_multi_fapl_t)); memcpy(fa.memb_map, memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t)); memcpy(fa.memb_fapl, memb_fapl, H5FD_MEM_NTYPES*sizeof(hid_t)); memcpy(fa.memb_name, memb_name, H5FD_MEM_NTYPES*sizeof(char*)); @@ -892,7 +893,7 @@ static void * H5FD_multi_fapl_copy(const void *_old_fa) { const H5FD_multi_fapl_t *old_fa = (const H5FD_multi_fapl_t*)_old_fa; - H5FD_multi_fapl_t *new_fa = (H5FD_multi_fapl_t *)malloc(sizeof(H5FD_multi_fapl_t)); + H5FD_multi_fapl_t *new_fa = (H5FD_multi_fapl_t *)calloc(1, sizeof(H5FD_multi_fapl_t)); int nerrors = 0; static const char *func="H5FD_multi_fapl_copy"; /* Function Name for error reporting */ |