Index: trunk/archive/scripts/src/phase2/papStuff.c
===================================================================
--- trunk/archive/scripts/src/phase2/papStuff.c	(revision 4820)
+++ trunk/archive/scripts/src/phase2/papStuff.c	(revision 5104)
@@ -6,4 +6,15 @@
 
 #include "papStuff.h"
+
+
+static void memPrint(const psPtr ptr)
+{
+    psMemBlock *mb = ((psMemBlock*)ptr) - 1;
+    printf("Memory block %lld (%lld):\n"
+	   "\tFile %s, line %d, size %d\n"
+	   "\tPosts: %x %x %x\n",
+	   mb->id, mb->refCounter, mb->file, mb->lineno, mb->userMemorySize, mb->startblock, mb->endblock,
+	   *(void**)((int8_t *)(mb + 1) + mb->userMemorySize));
+}
 
 // Split string on given characters
@@ -30,4 +41,5 @@
 		(void)psListAdd(values, PS_LIST_TAIL, word);
 		start = i + 1;
+		psFree(word);
 	    }
 	}
@@ -37,4 +49,5 @@
 	psString word = psStringNCopy(&string[start], length - start);
 	(void)psListAdd(values, PS_LIST_TAIL, word);
+	psFree(word);
     }
 
