summaryrefslogtreecommitdiffstats
path: root/c++/test/tdspl.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2014-03-31 05:27:17 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2014-03-31 05:27:17 (GMT)
commit5f17eea9cdda27b6d5e56359f4cc540cb5bb57d9 (patch)
tree1ae3fbb685f870bc2eb76303296466b6504b8e7d /c++/test/tdspl.cpp
parent82df757e966de5fdd346073ff2692b62416c96e3 (diff)
downloadhdf5-5f17eea9cdda27b6d5e56359f4cc540cb5bb57d9.zip
hdf5-5f17eea9cdda27b6d5e56359f4cc540cb5bb57d9.tar.gz
hdf5-5f17eea9cdda27b6d5e56359f4cc540cb5bb57d9.tar.bz2
[svn-r24929] Description:
Added proper deallocation/allocation to test. Revised incorrect comments. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
Diffstat (limited to 'c++/test/tdspl.cpp')
-rw-r--r--c++/test/tdspl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/c++/test/tdspl.cpp b/c++/test/tdspl.cpp
index 6364671..5944fb1 100644
--- a/c++/test/tdspl.cpp
+++ b/c++/test/tdspl.cpp
@@ -80,6 +80,7 @@ static void test_transfplist()
dxpl_c_to_f_copy.getDataTransform(c_to_f_read, tran_len+1);
verify_val((const char*)c_to_f_read, (const char*)c_to_f,
"DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
+ HDfree(c_to_f_read);
//
// Read the expression of each of the prop lists and verify the read
@@ -89,10 +90,12 @@ static void test_transfplist()
// Get and verify the expression with:
// ssize_t getDataTransform(char* exp, const size_t buf_size [default=0])
tran_len = dxpl_c_to_f.getDataTransform(NULL);
+ c_to_f_read = (char *)HDmalloc(tran_len+1);
HDmemset(c_to_f_read, 0, tran_len+1);
dxpl_c_to_f.getDataTransform(c_to_f_read, tran_len+1);
verify_val((const char*)c_to_f_read, (const char*)c_to_f,
"DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
+ HDfree(c_to_f_read);
// Get and verify the expression with:
// H5std_string DSetMemXferPropList::getDataTransform()
@@ -108,6 +111,7 @@ static void test_transfplist()
dxpl_utrans_inv.getDataTransform(utrans_inv_read, tran_len+1);
verify_val((const char*)utrans_inv_read, (const char*)utrans_inv,
"DSetMemXferPropList::getDataTransform", __LINE__, __FILE__);
+ HDfree(utrans_inv_read);
PASSED();
}