Index: /branches/eam_branches/ipp-20110213/ppStack/src/ppStackSetup.c
===================================================================
--- /branches/eam_branches/ipp-20110213/ppStack/src/ppStackSetup.c	(revision 30893)
+++ /branches/eam_branches/ipp-20110213/ppStack/src/ppStackSetup.c	(revision 30894)
@@ -51,5 +51,5 @@
     psString outputName = psStringCopy(psMetadataLookupStr(NULL, config->arguments,
                                                            "OUTPUT")); // Name for temporary files
-    const char *tempName = basename(outputName);
+    const char *tempName = psStringFileBasename(outputName);
     if (!tempName) {
         psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to construct basename for temporary files.");
@@ -65,4 +65,5 @@
                 "Unable to find TEMP.IMAGE, TEMP.MASK and TEMP.VARIANCE in recipe");
         psFree(outputName);
+	psFree(tempName);
         return false;
     }
@@ -82,4 +83,5 @@
     }
     psFree(outputName);
+    psFree(tempName);
 
     // Original images
