summaryrefslogtreecommitdiffstats
path: root/test/tid.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2013-10-31 04:20:36 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2013-10-31 04:20:36 (GMT)
commite6cace9ee46e903a8612aba7d9d1d72fa0968217 (patch)
treeac7d07ea06d3d5ac73e34bc54ff17620a4d083fe /test/tid.c
parent2eb24b16dac78b3e27769c20502299475fb8dde6 (diff)
downloadhdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.zip
hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.tar.gz
hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.tar.bz2
[svn-r24376] Updated all code to use HDmalloc, HDcalloc, and HDfree.
Prep work for adding a memory free function, part of HDFFV-8551. Tested on: 32-bit LE linux (jam) * with C++, Fortran * with thread safety on These are minor changes (almost entirely renaming foo functions to HDfoo) that don't change functionality. This should not require a full commit test.
Diffstat (limited to 'test/tid.c')
-rw-r--r--test/tid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/tid.c b/test/tid.c
index 87f3d37..4ea45db 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -81,13 +81,13 @@ static int basic_id_test(void)
/* Register an ID and retrieve the object it points to.
* Once the ID has been registered, testObj will be freed when
* its ID type is destroyed. */
- testObj = malloc(7 * sizeof(int));
+ testObj = HDmalloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if(arrayID == H5I_INVALID_HID)
{
- free(testObj);
+ HDfree(testObj);
goto out;
}
@@ -175,13 +175,13 @@ static int basic_id_test(void)
* freed when the previous type was destroyed. Allocate new
* memory for it.
*/
- testObj = malloc(7 * sizeof(int));
+ testObj = HDmalloc(7 * sizeof(int));
arrayID = H5Iregister(myType, testObj);
CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
if(arrayID == H5I_INVALID_HID)
{
- free(testObj);
+ HDfree(testObj);
goto out;
}
@@ -250,7 +250,7 @@ static int id_predefined_test(void )
void * testPtr;
herr_t testErr;
- testObj = malloc(sizeof(int));
+ testObj = HDmalloc(sizeof(int));
/* Try to perform illegal functions on various predefined types */
H5E_BEGIN_TRY
@@ -319,14 +319,14 @@ static int id_predefined_test(void )
/* testObj was never registered as an atom, so it will not be
* automatically freed. */
- free(testObj);
+ HDfree(testObj);
return 0;
out:
if(typeID != H5I_INVALID_HID)
H5Tclose(typeID);
if(testObj != NULL)
- free(testObj);
+ HDfree(testObj);
return -1;
}