Skip to content

Commit

Permalink
Merge pull request #13639 from mantidproject/fix_chebyshevpolyfit_mem…
Browse files Browse the repository at this point in the history
…leak

Fix memory leak with GSL vector
  • Loading branch information
peterfpeterson committed Sep 15, 2015
2 parents 05f6b3e + b712e7c commit e485326
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e485326

Please sign in to comment.