diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | mpfr.c | 2 |
2 files changed, 8 insertions, 0 deletions
@@ -9,6 +9,12 @@ * awk.h (cleanup_mpfr): Add declaration. * main.c (main): Add call to `cleanup_mpfr'. + Fix memory leak: + + * mpfr.c (do_mpfr_div): Add unref to denominator and numerator + to not leak memory. Thanks to Katie Wasserman <katie@wass.net> + for isolating the problem to that routine. + 2014-07-25 Arnold D. Robbins <arnold@skeeve.com> * main.c (main): Add a warning message if -M is used and gawk was @@ -1248,6 +1248,8 @@ do_mpfr_div(int nargs) mpz_tdiv_qr(quotient->mpg_i, remainder->mpg_i, num->mpg_i, denom->mpg_i); unref(num); unref(denom); + unref(numerator); + unref(denominator); sub = make_string("quotient", 8); lhs = assoc_lookup(result, sub); |