Skip to content
Snippets Groups Projects
Commit b712e7c1 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Fix memory leak with GSL vector

parent a56e04d6
No related merge requests found
......@@ -59,6 +59,7 @@ std::vector<double> ChebyshevPolyFitImpl::fit(const std::vector<double> &x,
auto *work = gsl_multifit_linear_alloc (npts, degp1);
double chisq(0.0);
gsl_multifit_linear (MX, yw, c, cov, &chisq, work);
gsl_vector_free(yw);
gsl_matrix_free(cov);
gsl_matrix_free(MX);
gsl_multifit_linear_free(work);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment