Fix numerous memory leaks.
[pspp] / src / language / stats / factor.c
index 797c5a67255eb920df2fb107bce3b8c003111aba..18341b8db50d470e2c4ac5d3c2128ec63f512921 100644 (file)
@@ -1533,6 +1533,10 @@ cmd_factor (struct lexer *lexer, struct dataset *ds)
        {
          do_factor_by_matrix (&factor, id);
 
+          gsl_matrix_free (id->ai_cov);
+          id->ai_cov = NULL;
+          gsl_matrix_free (id->ai_cor);
+          id->ai_cor = NULL;
          gsl_matrix_free (id->mm.corr);
          id->mm.corr = NULL;
          gsl_matrix_free (id->mm.cov);