bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] GAWK 4.1.60: Memory Leak in DIV() function


From: arnold
Subject: Re: [bug-gawk] GAWK 4.1.60: Memory Leak in DIV() function
Date: Tue, 29 Jul 2014 12:45:22 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

Katherine Wasserman <address@hidden> wrote:

> In version 4.1.60 there appears to be a major memory leak when calling
> the new DIV() function.

Thanks for the bug report. I believe that the patch below fixes
the problem.

Arnold
----------------
diff --git a/mpfr.c b/mpfr.c
index e9c9d15..934f091 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -1239,6 +1239,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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]