Index: trunk/psLib/test/sysUtils/tst_psHash04.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psHash04.c	(revision 929)
+++ trunk/psLib/test/sysUtils/tst_psHash04.c	(revision 1073)
@@ -14,7 +14,11 @@
 }
 ID;
+static void IdFree(ID *id);
+
 static ID *IdAlloc(const char *name)
 {
     ID *id = psAlloc(sizeof(ID));
+    p_psMemSetDeallocator(id,(psFreeFcn)IdFree);
+
     id->name = psStringCopy(name);
 
@@ -26,5 +30,4 @@
     imGlobal++;
     psFree(id->name);
-    psFree(id);
 }
 
@@ -40,4 +43,5 @@
     psList *myLinkList = NULL;
     psListElem *tmp = NULL;
+    ID* id = NULL;
 
     printPositiveTestHeader(stdout,
@@ -48,6 +52,7 @@
     i = 0;
     while (myKeys[i] != NULL) {
-        psHashInsert(myHashTable, myKeys[i], IdAlloc(myData[i]),
-                     (void (*)(void *))IdFree);
+        id = IdAlloc(myData[i]);
+        psHashInsert(myHashTable, myKeys[i], id);
+        psFree(id);
         i++;
     }
@@ -59,5 +64,5 @@
     }
 
-    psListFree(myLinkList, NULL);
+    psFree(myLinkList);
 
     printFooter(stdout,
@@ -66,7 +71,7 @@
                 testStatus);
 
-    psHashFree(myHashTable, (void (*)(void *))IdFree);
+    psFree(myHashTable);
 
-    memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
+    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
     if (0 != memLeaks) {
         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
