Skip to content

Commit f781c8f

Browse files
committed
Fix leak in bcpowmod
1 parent e7ef2b5 commit f781c8f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/bcmath/libbcmath/src/raisemod.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale)
101101
rscale = MAX(scale, power->n_scale);
102102
if ( !bc_compare(modulus, BCG(_one_)) )
103103
{
104+
bc_free_num (&temp);
104105
temp = bc_new_num (1, scale);
105106
}
106107
else

0 commit comments

Comments
 (0)