Index: trunk/psLib/test/psTest.c
===================================================================
--- trunk/psLib/test/psTest.c	(revision 931)
+++ trunk/psLib/test/psTest.c	(revision 951)
@@ -17,4 +17,6 @@
 
 #include "psTest.h"
+#include "psMemory.h"
+#include "psError.h"
 
 #define HEADER_TOP    "/----------------------------- TESTPOINT ------------------------------------------\\\n"
@@ -44,5 +46,14 @@
     child = fork();
     if (child == 0) {                   // I am the child process, run the test
-        exit(fcn());
+        int currentId = psMemGetId();
+        int retVal = fcn();
+        if (retVal == expectedReturn) {
+            if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
+                psError(__func__,"Memory Leaks Detected");
+                retVal = 64;
+            }
+            psMemCheckCorruption(1);
+        }
+        exit(retVal);
     } else if (child < 0) {
         fprintf(fp,"Couldn't fork a process to run a negative test (%s|%s)", packageName, testPointName);
