Index: branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtraction.c
===================================================================
--- branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtraction.c	(revision 30289)
+++ branches/eam_branches/ipp-20101205/psModules/src/imcombine/pmSubtraction.c	(revision 30303)
@@ -968,5 +968,6 @@
     kernels->numStamps = stats->clippedNvalues;
 
-    psLogMsg ("pmPSFtry", 4, "chisq vs flux fit: %f +/- %f\n", stats->sampleMean, stats->sampleStdev);
+    psLogMsg ("pmPSFtry", 4, "chisq vs flux model: %e + %e flux + %e flux^2\n", model->coeff[0], model->coeff[1], model->coeff[2]);
+    psLogMsg ("pmPSFtry", 4, "chisq vs flux resid: %f +/- %f\n", stats->sampleMean, stats->sampleStdev);
     psLogMsg("psModules.imcombine", PS_LOG_INFO, "Mean deviation from %d stamps: %lf +/- %lf",  kernels->numStamps, kernels->mean, kernels->rms);
 
@@ -1484,8 +1485,12 @@
     psImageCovarianceSetThreads(oldThreads);
 
-    // Copy anything that wasn't convolved
+    // Copy anything that wasn't convolved (they may have been allocated though, so free them)
     switch (kernels->mode) {
       case PM_SUBTRACTION_MODE_1:
         if (out2) {
+	    psFree(out2->image);
+	    psFree(out2->variance);
+	    psFree(out2->mask);
+	    psFree(out2->covariance);
             out2->image = psMemIncrRefCounter(ro2->image);
             out2->variance = psMemIncrRefCounter(ro2->variance);
@@ -1496,4 +1501,8 @@
       case PM_SUBTRACTION_MODE_2:
         if (out1) {
+	    psFree(out1->image);
+	    psFree(out1->variance);
+	    psFree(out1->mask);
+	    psFree(out1->covariance);
             out1->image = psMemIncrRefCounter(ro1->image);
             out1->variance = psMemIncrRefCounter(ro1->variance);
