Fix allocating too much memory in dset API test (#4041)

This commit is contained in:
mattjala 2024-02-26 14:27:51 -06:00 committed by GitHub
parent 221e429578
commit b79982a606
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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++) {