From: Nikita Popov Date: Fri, 21 Jun 2019 10:17:42 +0000 (+0200) Subject: Fix leak in bcpowmod X-Git-Tag: php-7.4.0alpha2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f781c8f1100ebefec800889171f4c8d0cf3c6637;p=php Fix leak in bcpowmod --- diff --git a/ext/bcmath/libbcmath/src/raisemod.c b/ext/bcmath/libbcmath/src/raisemod.c index 034a265ef2..58f9532545 100644 --- a/ext/bcmath/libbcmath/src/raisemod.c +++ b/ext/bcmath/libbcmath/src/raisemod.c @@ -101,6 +101,7 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale) rscale = MAX(scale, power->n_scale); if ( !bc_compare(modulus, BCG(_one_)) ) { + bc_free_num (&temp); temp = bc_new_num (1, scale); } else