diff options
author | David Young <dyoung@hdfgroup.org> | 2019-09-30 19:28:13 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-09-30 19:28:13 (GMT) |
commit | 20dd9b1372b58e4d8707dced082070f02c501e8c (patch) | |
tree | 60cbfc927299815cd119b03f65a059266e03b182 | |
parent | 38f3ece57a3b875b0c51bc4fcec53c973ac51978 (diff) | |
download | hdf5-20dd9b1372b58e4d8707dced082070f02c501e8c.zip hdf5-20dd9b1372b58e4d8707dced082070f02c501e8c.tar.gz hdf5-20dd9b1372b58e4d8707dced082070f02c501e8c.tar.bz2 |
Initialize `data` and `odata` to NULL like the exit sequences
expect. Free `odata`.
-rw-r--r-- | test/page_buffer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/page_buffer.c b/test/page_buffer.c index c92e647..affde94 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -621,7 +621,7 @@ test_mpmde_delay_basic(hid_t orig_fapl, const char *env_h5_drvr) int64_t base_page_cnt; int64_t page_count = 0; size_t i, num_elements = 2000; - int *data, *odata; + int *data = NULL, *odata = NULL; H5F_t *f; H5F_vfd_swmr_config_t config; /* Configuration for VFD SWMR */ hsize_t pgsz = sizeof(int) * 200; @@ -730,6 +730,8 @@ error: H5Fclose(file_id); if (data) HDfree(data); + if (odata) + HDfree(odata); } H5E_END_TRY; return 1; } @@ -767,7 +769,7 @@ test_spmde_delay_basic(hid_t orig_fapl, const char *env_h5_drvr) int64_t base_page_cnt; int64_t page_count = 0; size_t i, num_elements = 20; - int *data, *odata; + int *data = NULL, *odata = NULL; H5F_t *f; H5F_vfd_swmr_config_t config; /* Configuration for VFD SWMR */ hsize_t pgsz = sizeof(int) * 200; @@ -1043,6 +1045,8 @@ error: H5Fclose(file_id); if (data) HDfree(data); + if (odata) + HDfree(odata); } H5E_END_TRY; return 1; } |