summaryrefslogtreecommitdiffstats
path: root/test/dtypes.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2014-03-31 23:35:09 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2014-03-31 23:35:09 (GMT)
commitd01ee66666f4cad8e5f3f67a51a5774adcc03e45 (patch)
tree1980b2237af734a2784314b85a8b8f4edbfcf14e /test/dtypes.c
parentef9db69bf33a200f81ebb3e29dbcbbdab92938cf (diff)
downloadhdf5-d01ee66666f4cad8e5f3f67a51a5774adcc03e45.zip
hdf5-d01ee66666f4cad8e5f3f67a51a5774adcc03e45.tar.gz
hdf5-d01ee66666f4cad8e5f3f67a51a5774adcc03e45.tar.bz2
[svn-r24937] Adds an H5free_memory() function to the library for use with
functions that return library-allocated memory. The test and tool code were modified to use this new function where it's appropriate. Fixes HDFFV-7710, HDFFV-8519, and HDFFV-8551 Tested on: 64-bit Windows 7 w/ VS2012 32-bit LE linux w/ parallel and fortran (jam) 32-bit LE linux w/ fortran and C++ (jam)
Diffstat (limited to 'test/dtypes.c')
-rw-r--r--test/dtypes.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index 5826097..f297b58 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -651,7 +651,7 @@ test_compound_1(void)
error:
if(tag)
- HDfree(tag);
+ H5free_memory(tag);
return retval;
}
@@ -4422,7 +4422,7 @@ error:
if(buf)
HDfree(buf);
if(tag)
- HDfree(tag);
+ H5free_memory(tag); /* Technically allocated by API call */
reset_hdf5();
return ret_value; /* Number of errors */
@@ -4790,8 +4790,7 @@ test_bitfield_funcs(void)
error:
if (retval == -1) retval = 1;
-
- HDfree(tag);
+ H5free_memory(tag);
H5Tclose(ntype);
H5Tclose(type);
if (retval == 0) PASSED();
@@ -6473,7 +6472,7 @@ test_named_indirect_reopen(hid_t fapl)
if(dt_size != H5Tget_size(type)) TEST_ERROR
if(NULL == (tag_ret = H5Tget_tag(type))) TEST_ERROR
if(HDstrcmp(tag, tag_ret)) TEST_ERROR
- HDfree(tag_ret);
+ H5free_memory(tag_ret);
tag_ret = NULL;
/* Create dataset with opaque type */
@@ -6484,7 +6483,7 @@ test_named_indirect_reopen(hid_t fapl)
if(dt_size != H5Tget_size(reopened_type)) TEST_ERROR
if(NULL == (tag_ret = H5Tget_tag(type))) TEST_ERROR
if(HDstrcmp(tag, tag_ret)) TEST_ERROR
- HDfree(tag_ret);
+ H5free_memory(tag_ret);
tag_ret = NULL;
/* Close types and dataset */
@@ -6534,7 +6533,7 @@ error:
H5Fclose(file);
} H5E_END_TRY;
if(tag_ret)
- HDfree(tag_ret);
+ H5free_memory(tag_ret);
return 1;
} /* end test_named_indirect_reopen() */