summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-12 02:00:45 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-12 02:00:45 (GMT)
commitd9703d66de5fe67b1bc3bb1c1017a22d50e369bf (patch)
tree96bebe64ea727b4ea992e08fd63a54a6d09bae08 /c++/test
parentf466a5d298885c4d3dd813c0e6c8db9319cade50 (diff)
downloadhdf5-d9703d66de5fe67b1bc3bb1c1017a22d50e369bf.zip
hdf5-d9703d66de5fe67b1bc3bb1c1017a22d50e369bf.tar.gz
hdf5-d9703d66de5fe67b1bc3bb1c1017a22d50e369bf.tar.bz2
[svn-r25021] Description:
Added proper deallocation/allocation to test. Revised incorrect comments. (merged from trunk-r24929) Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
Diffstat (limited to 'c++/test')
-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();
}