From b712e7c1e627dd20a8d276b3c290aa529066995c Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@gmail.com> Date: Tue, 15 Sep 2015 14:19:29 +0100 Subject: [PATCH] Fix memory leak with GSL vector --- Code/Mantid/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Code/Mantid/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp b/Code/Mantid/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp index 276e6a1675a..1fe887ddf33 100644 --- a/Code/Mantid/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp +++ b/Code/Mantid/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp @@ -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); -- GitLab