Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 15406)
+++ trunk/psLib/src/math/psStats.c	(revision 15407)
@@ -13,6 +13,6 @@
  * use ->min and ->max (PS_STAT_USE_RANGE)
  *
- *  @version $Revision: 1.219 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-10-24 19:08:24 $
+ *  @version $Revision: 1.220 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-10-29 20:36:28 $
  *
  *  Copyright 2006 IfA, University of Hawaii
@@ -340,5 +340,4 @@
 
     // Sort the temporary vector.
-    // XXX this is messed up: should psVectorSort free on error or not?
     if (!psVectorSort(outVector, outVector)) { // Sort in-place (since it's a copy, it's OK)
         psError(PS_ERR_UNEXPECTED_NULL, false, _("Failed to sort input data."));
@@ -346,4 +345,5 @@
         stats->sampleLQ = NAN;
         stats->sampleMedian = NAN;
+        psFree(outVector);
         return true;
     }
