Index: trunk/psLib/src/imageops/psImageMapFit.c
===================================================================
--- trunk/psLib/src/imageops/psImageMapFit.c	(revision 30078)
+++ trunk/psLib/src/imageops/psImageMapFit.c	(revision 34153)
@@ -317,4 +317,5 @@
         psFree (A);
         psFree (B);
+	psFree (Empty);
         return true;
     }
@@ -408,4 +409,6 @@
 	if (!*pGoodFit) {
 	    psWarning ("bad fit to image map, try something else");
+            psFree(resid);
+            if (!inMask) psFree (mask);
 	    return true;
 	}
