From 924cb75ba881bd6c17629f11937d79ce23fab8d0 Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Fri, 16 Apr 1999 14:18:46 -0500 Subject: [svn-r1190] moved some of the code around to fix a crash in the dll version of the test. All changes were surrounded #ifdef _HDF5USEDLL --- test/ragged.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/ragged.c b/test/ragged.c index b40e3b1..4fb4f73 100644 --- a/test/ragged.c +++ b/test/ragged.c @@ -367,8 +367,13 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once) goto error; } } +#ifndef _HDF5USEDLL_ +/* + For NT dll version we free memory down at the bottom. crashed otherwise. +*/ free(buf[i]); buf[i] = NULL; +#endif } /* Print statistics? */ @@ -418,6 +423,16 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once) printf(" %27s%10s\n", "", s); /* Cleanup */ +#ifdef _HDF5USEDLL_ +/* + Need to clean up the memory we allocated. Had to move this down here + for NT. Crashing when it was up in the original location +*/ + for (i = 0; i < rows_at_once && size[i]; i++){ + free(buf[i]); + // buf[i] = NULL; + } +#endif free(size); free(buf); printf("%-70s PASSED\n\n", testname); -- cgit v0.12