Index: trunk/psphot/src/image_stats.c
===================================================================
--- trunk/psphot/src/image_stats.c	(revision 4642)
+++ trunk/psphot/src/image_stats.c	(revision 4901)
@@ -36,5 +36,5 @@
 	stats = psVectorStats (stats, subset, NULL, NULL, 0); // use a mask?
 	psFree (subset);
-	psFree (rnd)
+	psFree (rnd);
     }
 
@@ -52,4 +52,5 @@
     psLogMsg ("psphot", 3, "background: %f +/- %f\n", sky->sampleMean, sky->sampleStdev);
 
+    psFree (stats);
     return (sky);
 }
