summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-04-16 19:18:46 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-04-16 19:18:46 (GMT)
commit924cb75ba881bd6c17629f11937d79ce23fab8d0 (patch)
tree8992e5dbf81fa3645183017a33034b006e4519d6 /test
parent1991756aec702acd1814d94dd8b4c9b95e4d3b7a (diff)
downloadhdf5-924cb75ba881bd6c17629f11937d79ce23fab8d0.zip
hdf5-924cb75ba881bd6c17629f11937d79ce23fab8d0.tar.gz
hdf5-924cb75ba881bd6c17629f11937d79ce23fab8d0.tar.bz2
[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
Diffstat (limited to 'test')
-rw-r--r--test/ragged.c15
1 files changed, 15 insertions, 0 deletions
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);