xalloc.h-instead-of-alloc.h.patch from patch #6230.
[pspp-builds.git] / src / language / stats / t-test.q
index 9691578e7fdd6835e1cd980435f7af6903b3584b..fa33a4461db3d8a8a9d2b6413d4733640846e137 100644 (file)
 #include <language/command.h>
 #include <language/dictionary/split-file.h>
 #include <language/lexer/lexer.h>
-#include <libpspp/alloc.h>
 #include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
 #include <libpspp/hash.h>
-#include <libpspp/magic.h>
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
@@ -46,6 +44,7 @@
 #include <output/table.h>
 
 #include "size_max.h"
+#include "xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -1787,7 +1786,10 @@ calculate(struct cmd_t_test *cmd,
   enum mv_class exclude = cmd->miss != TTS_INCLUDE ? MV_ANY : MV_SYSTEM;
 
   if (!casereader_peek (input, 0, &c))
-    return;
+    {
+      casereader_destroy (input);
+      return;
+    }
   output_split_file_values (ds, &c);
   case_destroy (&c);
 
@@ -1849,6 +1851,8 @@ calculate(struct cmd_t_test *cmd,
       trbox_populate(&test_results_box,cmd);
       trbox_finalize(&test_results_box);
     }
+
+  taint_destroy (taint);
 }
 
 short which_group(const struct group_statistics *g,