Index: trunk/psLib/test/sysUtils/tst_psHash04.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psHash04.c	(revision 584)
+++ trunk/psLib/test/sysUtils/tst_psHash04.c	(revision 860)
@@ -1,4 +1,4 @@
 /*****************************************************************************
-    This code tests whether the call psHashKeyList() function works.
+    This code will test whether the call psHashKeyList() function works.
  *****************************************************************************/
 #include <stdio.h>
@@ -36,4 +36,6 @@
     char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL};
     char *myData[] = {"IDA", "IDB", "IDC", "IDD", NULL};
+    int currentId = psMemGetId();
+    int memLeaks        = 0;
 
     printPositiveTestHeader(stdout,
@@ -59,4 +61,12 @@
                 testStatus);
 
+    psHashFree(myHashTable, NULL);
+
+    memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
+    if (0 != memLeaks) {
+        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
+    }
+    psMemCheckCorruption(1);
+
     return(!testStatus);
 }
