Show errors on reading badly formed gnumeric files
[pspp] / src / language / stats / chisquare.c
index ed91013e54d29076db3c4a4866a6c1f60afdf737..2b5864ee1ef7ba3a970971d8c06878c4f126f760 100644 (file)
 #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;
     }