mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
74c0769319
mpz_mod() was calling mpz_init_heap() on its output parameter, assuming it was uninitialized. However, callers like mpz_powm_i() pass already- initialized variables, causing the old allocations to leak. Changed to use mpz_realloc() which properly handles both cases. Co-authored-by: Claude <noreply@anthropic.com>