ex-1: fix leak in landau_qdf

This commit is contained in:
Michele Guerini Rocco 2020-04-06 08:54:10 +00:00
parent f0b37cad0b
commit ff56757258

View File

@ -92,6 +92,10 @@ double landau_qdf(double p0) {
}
fprintf(stderr, "QDF error: %.3g\n", upp - low);
double root = gsl_root_fsolver_root(s);
return gsl_root_fsolver_root(s);
// free memory
gsl_root_fsolver_free(s);
return root;
}