Index: /trunk/ppStack/src/ppStackLoop.c
===================================================================
--- /trunk/ppStack/src/ppStackLoop.c	(revision 27166)
+++ /trunk/ppStack/src/ppStackLoop.c	(revision 27167)
@@ -61,5 +61,4 @@
     if (!ppStackSetup(options, config)) {
         psError(psErrorCodeLast(), false, "Unable to setup.");
-        psFree(options);
         return false;
     }
@@ -72,5 +71,4 @@
     if (!ppStackPrepare(options, config)) {
         psError(psErrorCodeLast(), false, "Unable to prepare for stacking.");
-        psFree(options);
         return false;
     }
@@ -80,16 +78,4 @@
     if (options->quality) {
         // Can't do anything else
-#if 0
-        pmFPAview *view = pmFPAviewAlloc(0);// Pointer into FPA hierarchy
-        view->chip = view->cell = view->readout = 0;
-        for (int i = 0; i < options->num; i++) {
-            pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT", i); // File of interest
-            pmReadout *ro = pmFPAviewThisReadout(view, file->fpa);                      // Readout of interest
-            if (ro) {
-                ro->data_exists = false;
-            }
-        }
-        psFree(view);
-#endif
         return true;
     }
@@ -99,5 +85,4 @@
     if (!ppStackConvolve(options, config)) {
         psError(psErrorCodeLast(), false, "Unable to convolve images.");
-        psFree(options);
         return false;
     }
@@ -122,5 +107,4 @@
     if (!stack) {
         psError(psErrorCodeLast(), false, "Unable to initialise stack threads.");
-        psFree(options);
         return false;
     }
@@ -130,5 +114,4 @@
         psError(psErrorCodeLast(), false, "Unable to prepare for combination.");
         psFree(stack);
-        psFree(options);
         return false;
     }
@@ -139,5 +122,4 @@
         psError(psErrorCodeLast(), false, "Unable to perform initial combination.");
         psFree(stack);
-        psFree(options);
         return false;
     }
@@ -151,5 +133,4 @@
         psError(psErrorCodeLast(), false, "Unable to reject pixels.");
         psFree(stack);
-        psFree(options);
         return false;
     }
@@ -171,5 +152,4 @@
         psError(psErrorCodeLast(), false, "Unable to perform final combination.");
         psFree(stack);
-        psFree(options);
         return false;
     }
@@ -182,5 +162,4 @@
         psError(psErrorCodeLast(), false, "Unable to clean up.");
         psFree(stack);
-        psFree(options);
         return false;
     }
@@ -197,5 +176,4 @@
         if (!stack) {
             psError(psErrorCodeLast(), false, "Unable to initialise stack threads.");
-            psFree(options);
             return false;
         }
@@ -204,5 +182,4 @@
             psError(psErrorCodeLast(), false, "Unable to perform unconvolved combination.");
             psFree(stack);
-            psFree(options);
             return false;
         }
@@ -219,5 +196,4 @@
     if (!ppStackPhotometry(options, config)) {
         psError(psErrorCodeLast(), false, "Unable to perform photometry.");
-        psFree(options);
         return false;
     }
@@ -229,10 +205,7 @@
     if (!ppStackFinish(options, config)) {
         psError(psErrorCodeLast(), false, "Unable to finish up.");
-        psFree(options);
         return false;
     }
     ppStackMemDump("finish");
-
-    psFree(options);
 
     return true;
