Index: trunk/psphot/src/psphotImageBackground.c
===================================================================
--- trunk/psphot/src/psphotImageBackground.c	(revision 6311)
+++ trunk/psphot/src/psphotImageBackground.c	(revision 6319)
@@ -1,4 +1,5 @@
 # include "psphot.h"
 
+// 2006.02.02 : no leaks
 psPolynomial2D *psphotImageBackground (pmReadout *readout, psMetadata *config, psStats *sky) 
 { 
@@ -61,4 +62,9 @@
     sky->sampleMean = 0.0;
 
+    psFree (x);
+    psFree (y);
+    psFree (z);
+    psFree (rnd);  // XXX should this be made available at a higher level?
+
     psLogMsg ("psphot", 3, "fit background model: %f sec\n", psTimerMark ("psphot"));
     return (skyModel);
