From d001d0ec27b93f9676776b385411cad8c3573979 Mon Sep 17 00:00:00 2001 From: David Young Date: Tue, 17 Sep 2019 11:00:10 -0500 Subject: Use calloc instead of malloc so that the VFD SWMR configuration is initialized to default values. --- tools/lib/h5tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index ef7dae1..21cd608 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -444,7 +444,7 @@ swmr_fapl_augment(hid_t fapl, const char *fname) } /* Allocate memory for the configuration structure */ - config = (H5F_vfd_swmr_config_t *)HDmalloc(sizeof(H5F_vfd_swmr_config_t)); + config = (H5F_vfd_swmr_config_t *)HDcalloc(1, sizeof(*config)); if(config == NULL) { HDfprintf(rawerrorstream, "VFD SWMR config allocation failed\n"); return H5I_INVALID_HID; -- cgit v0.12