covariance: Fix const-ness of covariance_calculate[_unnormalized] retval.
[pspp-builds.git] / src / language / stats / correlations.c
index d8f13488f9b9b445aa096ccb510b01b2b4f2f57c..4f476433b3f73c3612261a51fb987a06bc0255ea 100644 (file)
@@ -278,7 +278,7 @@ run_corr (struct casereader *r, const struct corr_opts *opts, const struct corr
 {
   struct ccase *c;
   const gsl_matrix *var_matrix,  *samples_matrix, *mean_matrix;
-  const gsl_matrix *cov_matrix;
+  gsl_matrix *cov_matrix;
   gsl_matrix *corr_matrix;
   struct covariance *cov = covariance_2pass_create (corr->n_vars_total, corr->vars,
                                                    NULL,
@@ -315,6 +315,7 @@ run_corr (struct casereader *r, const struct corr_opts *opts, const struct corr
 
   covariance_destroy (cov);
   gsl_matrix_free (corr_matrix);
+  gsl_matrix_free (cov_matrix);
 }
 
 int