Fix bug #37984 - EXAMINE extremes vs. fractional weights.
[pspp] / src / language / stats / chisquare.c
index 6218228690526da661921ec38b82d33c63b13a78..2b5864ee1ef7ba3a970971d8c06878c4f126f760 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#include <language/stats/chisquare.h>
+#include "language/stats/chisquare.h"
 
 #include <gsl/gsl_cdf.h>
 #include <math.h>
 #include <stdlib.h>
 
-#include "data/format.h"
 #include "data/case.h"
 #include "data/casereader.h"
+#include "data/dataset.h"
 #include "data/dictionary.h"
-#include "data/procedure.h"
+#include "data/format.h"
 #include "data/value-labels.h"
 #include "data/variable.h"
 #include "language/stats/freq.h"
@@ -88,6 +88,8 @@ create_freq_hash_with_range (const struct dictionary *dict,
         }
     }
 
+  free (entries);
+
   return casereader_destroy (input);
 }
 
@@ -152,6 +154,7 @@ create_variable_frequency_table (const struct dictionary *dict,
          test->n_expected, n_cells,
          var_get_name (var)
          );
+      freq_hmap_destroy (freq_hash, var_get_width (var));
       return NULL;
     }