diff options
author | mattjala <124107509+mattjala@users.noreply.github.com> | 2024-02-26 20:27:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-26 20:27:51 (GMT) |
commit | b79982a6062da9af83bfc3065c0c230aeebff875 (patch) | |
tree | ac75ac8f531721738fc2c3217146fa635ea167cf /test | |
parent | 221e4295788d3e5d2a8afe147c8127e8cf40732f (diff) | |
download | hdf5-b79982a6062da9af83bfc3065c0c230aeebff875.zip hdf5-b79982a6062da9af83bfc3065c0c230aeebff875.tar.gz hdf5-b79982a6062da9af83bfc3065c0c230aeebff875.tar.bz2 |
Fix allocating too much memory in dset API test (#4041)
Diffstat (limited to 'test')
-rw-r--r-- | test/API/H5_api_dataset_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c index 257191f..2989b70 100644 --- a/test/API/H5_api_dataset_test.c +++ b/test/API/H5_api_dataset_test.c @@ -10047,7 +10047,7 @@ test_dataset_vlen_io(void) TESTING_2("write and read entire dataspace with string sequence"); /* Set up write buffer */ for (size_t i = 0; i < DATASET_VLEN_IO_DSET_DIMS; i++) { - if ((wbuf[i].p = calloc(i + 1, DATASET_VLEN_IO_STR_LEN * (i + 1))) == NULL) + if ((wbuf[i].p = calloc(i + 1, DATASET_VLEN_IO_STR_LEN)) == NULL) PART_TEST_ERROR(rw_all_string); for (size_t j = 0; j < i + 1; j++) { |