# HG changeset patch # User Jerry James # Date 1411512648 21600 # Node ID be31f7878b0da33c1ba3b87862f589a9a7d4a659 # Parent 2f22818d92d42460586af6894cdbc4166cba3e6b Fix bignum/bigfloat memory leaks. See xemacs-patches message . diff -r 2f22818d92d4 -r be31f7878b0d src/ChangeLog --- a/src/ChangeLog Sat Sep 06 14:30:15 2014 +0100 +++ b/src/ChangeLog Tue Sep 23 16:50:48 2014 -0600 @@ -1,3 +1,8 @@ +2014-09-23 Jerry James + + * floatfns.c (round_two_bignum_1): Fix memory leak. + (round_two_bigfloat): Ditto. + 2014-09-06 Aidan Kehoe * select-x.c (Fx_store_cutbuffer_internal): diff -r 2f22818d92d4 -r be31f7878b0d src/floatfns.c --- a/src/floatfns.c Sat Sep 06 14:30:15 2014 +0100 +++ b/src/floatfns.c Tue Sep 23 16:50:48 2014 -0600 @@ -1681,6 +1681,10 @@ *res = make_bignum_bg (floored); *remain = make_bignum_bg (scratch_bignum); } + bignum_fini (flsecond); + bignum_fini (floored); + bignum_fini (flooring); + bignum_fini (hi2); } static Lisp_Object @@ -1835,6 +1839,7 @@ bigfloat_div (divided, XBIGFLOAT_DATA (number), XBIGFLOAT_DATA (divisor)); res0 = round_one_bigfloat_1 (divided); + bigfloat_fini (divided); bigfloat_set_prec (scratch_bigfloat, prec); bigfloat_set_prec (scratch_bigfloat2, prec);