Index: /trunk/ippTools/src/pxdata.c.template
===================================================================
--- /trunk/ippTools/src/pxdata.c.template	(revision 12094)
+++ /trunk/ippTools/src/pxdata.c.template	(revision 12095)
@@ -51,12 +51,14 @@
         // if we do, slurp the file
         psString text = psSlurpFilename(filepath);
-        psFree(filepath);
         if (!text) {
             psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
+            psFree(filepath);
             return NULL;
         }
+        psFree(filepath);
 
         return text;
     }
+    psFree(filepath);
 
     // look under our share path
@@ -67,12 +69,14 @@
         // if we do, slurp the file
         psString text = psSlurpFilename(filepath);
-        psFree(filepath);
         if (!text) {
             psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
+            psFree(filepath);
             return NULL;
         }
+        psFree(filepath);
 
         return text;
     }
+    psFree(filepath);
 
     // couldn't find a matching filename
