(cmd_crosstabs): Free xtab and the structures that it points to, to
[pspp-builds.git] / src / language / stats / crosstabs.q
index e57d9343c724ec96b2cb5badf2ec5eaa1fed48c1..8adf044c95129abbd2126f38e6a68b8aa602d9cf 100644 (file)
@@ -191,11 +191,16 @@ int
 cmd_crosstabs (struct lexer *lexer, struct dataset *ds)
 {
   int result = internal_cmd_crosstabs (lexer, ds);
+  int i;
 
   free (variables);
   pool_destroy (pl_tc);
   pool_destroy (pl_col);
 
+  for (i = 0; i < nxtab; i++)
+    free (xtab[i]);
+  free (xtab);
+
   return result;
 }