Index: trunk/ppSub/src/ppSubThreshold.c
===================================================================
--- trunk/ppSub/src/ppSubThreshold.c	(revision 26982)
+++ trunk/ppSub/src/ppSubThreshold.c	(revision 30619)
@@ -98,4 +98,5 @@
     if (!in) {
         psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
+	psFree(view);
         return false;
     }
@@ -104,4 +105,5 @@
     if (!ref) {
         psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
+	psFree(view);
         return false;
     }
@@ -115,8 +117,10 @@
         if (!lowThreshold(in, thresh, maskVal, maskThresh, region, "input convolved image")) {
             psError(psErrorCodeLast(), false, "Unable to threshold input image.");
+	    psFree(view);
             return false;
         }
         if (!lowThreshold(ref, thresh, maskVal, maskThresh, region, "reference convolved image")) {
             psError(psErrorCodeLast(), false, "Unable to threshold input image.");
+	    psFree(view);
             return false;
         }
