summaryrefslogtreecommitdiffstats
path: root/test/tid.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-11-22 17:27:08 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-11-22 17:27:08 (GMT)
commit8f3a6ae8b7bf2554478b668a102f37a9f1363e3e (patch)
tree8ca4b4d22964f978670e8668e240f99aa43f3f47 /test/tid.c
parent10d221961cd178734d674cb7d20465374ac37afd (diff)
downloadhdf5-8f3a6ae8b7bf2554478b668a102f37a9f1363e3e.zip
hdf5-8f3a6ae8b7bf2554478b668a102f37a9f1363e3e.tar.gz
hdf5-8f3a6ae8b7bf2554478b668a102f37a9f1363e3e.tar.bz2
[svn-r24462] Bring revision #24457 from revise_chunks.
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;
}