diff options
author | David Young <dyoung@hdfgroup.org> | 2019-09-17 16:00:10 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-09-17 16:00:10 (GMT) |
commit | d001d0ec27b93f9676776b385411cad8c3573979 (patch) | |
tree | 664aac71c3dca8f7e7e4bb0c3bcd53b77526d83a /tools/lib | |
parent | 73e07e25736d551fb0b95dbbbf04fec11abd994e (diff) | |
download | hdf5-d001d0ec27b93f9676776b385411cad8c3573979.zip hdf5-d001d0ec27b93f9676776b385411cad8c3573979.tar.gz hdf5-d001d0ec27b93f9676776b385411cad8c3573979.tar.bz2 |
Use calloc instead of malloc so that the VFD SWMR configuration
is initialized to default values.
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5tools.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |