Index: trunk/psLib/test/sysUtils/tst_psHash02.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psHash02.c	(revision 584)
+++ trunk/psLib/test/sysUtils/tst_psHash02.c	(revision 860)
@@ -1,7 +1,7 @@
 /*****************************************************************************
-    This code tests whether hash tables entries can be inserted correctly.
+    This code will test whether hash tables entries can be inserted correctly.
  
     GUS: Add code to test whether duplicates are handled correctly (use a
-    small hast table and lots of keys).
+    small hash table and lots of keys).
  *****************************************************************************/
 #include <stdio.h>
@@ -41,4 +41,6 @@
     char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL};
     char *myData[] = {"IDA", "IDB", "IDC", "IDD", NULL};
+    int currentId = psMemGetId();
+    int memLeaks        = 0;
 
     printPositiveTestHeader(stdout,
@@ -69,4 +71,12 @@
                 testStatus);
 
+    psHashFree(myHashTable, NULL);
+
+    memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
+    if (0 != memLeaks) {
+        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
+    }
+    psMemCheckCorruption(1);
+
     return (!testStatus);
 }
