Index: trunk/psphot/src/psphotDiagnosticPlots.c
===================================================================
--- trunk/psphot/src/psphotDiagnosticPlots.c	(revision 25885)
+++ trunk/psphot/src/psphotDiagnosticPlots.c	(revision 25886)
@@ -68,4 +68,5 @@
     if (!psVectorStats (stats, histogram->nums, NULL, NULL, 0)) {
 	psError(PS_ERR_UNKNOWN, false, "failure to measure stats for histogram");
+	psFree(histogram);
         return false;
     }
@@ -108,4 +109,5 @@
     if (!psVectorStats (stats, histogram->nums, NULL, NULL, 0)) {
 	psError(PS_ERR_UNKNOWN, false, "failure to measure stats for histogram");
+	psFree(histogram);
         return false;
     }
