diff options
Diffstat (limited to 'test/tvltypes.c')
-rw-r--r-- | test/tvltypes.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/tvltypes.c b/test/tvltypes.c index f8a6a91..d00519d 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -1001,8 +1001,8 @@ test_vltypes_compound_vlen_vlen(void) float f; hvl_t v; } s1; - s1 wdata[SPACE3_DIM1]; /* data to write */ - s1 rdata[SPACE3_DIM1]; /* data to read */ + s1 *wdata; /* data to write */ + s1 *rdata; /* data to read */ hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ hid_t sid1; /* Dataspace ID */ @@ -1016,6 +1016,10 @@ test_vltypes_compound_vlen_vlen(void) MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n")); /* Allocate and initialize VL data to write */ + wdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1); + CHECK(wdata, NULL, "HDmalloc"); + rdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1); + CHECK(rdata, NULL, "HDmalloc"); for(i = 0; i < SPACE3_DIM1; i++) { wdata[i].i = (int)(i * 10); wdata[i].f = (float)(i * 20) / 3.0F; @@ -1147,6 +1151,10 @@ test_vltypes_compound_vlen_vlen(void) /* Close file */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); + + /* Release buffers */ + HDfree(wdata); + HDfree(rdata); } /* end test_vltypes_compound_vlen_vlen() */ /**************************************************************** |