diff --git a/ex-1/landau.c b/ex-1/landau.c index 5728721..6a4a982 100644 --- a/ex-1/landau.c +++ b/ex-1/landau.c @@ -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; }