diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2013-07-30 04:31:05 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2013-07-30 04:31:05 (GMT) |
commit | 21130b20b8b242b7c567f008f4d88be02f66b839 (patch) | |
tree | bd771c82f596ba34fabe90f1f8998462c3a24ece | |
parent | 0b82ac9dfe1162983e74aab3b2503a2491d712d8 (diff) | |
download | hdf5-21130b20b8b242b7c567f008f4d88be02f66b839.zip hdf5-21130b20b8b242b7c567f008f4d88be02f66b839.tar.gz hdf5-21130b20b8b242b7c567f008f4d88be02f66b839.tar.bz2 |
[svn-r23943] Description:
Fixed an allocation/deallocation mistake that caused test to fail on
Windows.
Platforms tested:
Linux/32 2.6 (jam) with GNU compilers
SunOS 5.11 (emu)
-rw-r--r-- | c++/test/th5s.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 4c1540e..cfdeb1f 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -188,10 +188,10 @@ static void test_h5s_basic() * If this test fails and the H5S_MAX_RANK variable has changed, follow * the instructions in space_overflow.c for regenating the th5s.h5 file. */ - char *tmp_str = new char[TESTFILE.length()]; + char *tmp_str = new char[TESTFILE.length()+1]; strcpy(tmp_str, TESTFILE.c_str()); const char *testfile = H5_get_srcdir_filename(tmp_str); - delete tmp_str; + delete []tmp_str; // Create file H5File fid1(testfile, H5F_ACC_RDONLY); |