Patch #6262. New developers guide and resulting fixes and cleanups.
[pspp] / src / language / stats / glm.q
index b121126545763c74439441e2d7183fb931cdcf92..2e230c3620bce5bbb492946e739f85dabf2ca078 100644 (file)
@@ -36,7 +36,6 @@
 #include <language/dictionary/split-file.h>
 #include <language/data-io/file-handle.h>
 #include <language/lexer/lexer.h>
-#include <libpspp/alloc.h>
 #include <libpspp/compiler.h>
 #include <libpspp/message.h>
 #include <math/design-matrix.h>
@@ -45,6 +44,7 @@
 #include <math/moments.h>
 #include <output/table.h>
 
+#include "xalloc.h"
 #include "gettext.h"
 
 #define GLM_LARGE_DATA 1000
@@ -251,7 +251,10 @@ run_glm (struct casereader *input,
   assert (model != NULL);
 
   if (!casereader_peek (input, 0, &c))
-    return true;
+    {
+      casereader_destroy (input);
+      return true;
+    }
   output_split_file_values (ds, &c);
   case_destroy (&c);