Factor: fix memory leaks relating to PROMAX and update NEWS
[pspp] / src / language / stats / factor.c
index c3a7e8ee2418b889499080e283d31c3dbe1c5cd3..208307d0f11e781b1a5dceaf4fdd7a1c88e8df8a 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011, 2012, 2014 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
@@ -316,7 +316,7 @@ ssq_od_n (const gsl_matrix *m, int n)
 
 
 
-#if 1
+#if 0
 static void
 dump_matrix (const gsl_matrix *m)
 {
@@ -904,6 +904,23 @@ rotate (const struct cmd_factor *cf, const gsl_matrix *unrot,
                              pm1);
 
       gsl_matrix_memcpy (result, pm1);
+
+
+      gsl_matrix_free (QQinv);
+      gsl_matrix_free (C);
+      gsl_matrix_free (Cinv);
+
+      gsl_matrix_free (D);
+      gsl_matrix_free (Q);
+      gsl_matrix_free (L);
+      gsl_matrix_free (P);
+
+      gsl_permutation_free (perm);
+
+      gsl_matrix_free (mm1);
+      gsl_matrix_free (mm2);
+      gsl_matrix_free (mp1);
+      gsl_matrix_free (pm1);
     }