mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-bigint (mrb_bint_add_n): fixed a memory leak
This commit is contained in:
@@ -1508,6 +1508,8 @@ mrb_bint_add_n(mrb_state *mrb, mrb_value x, mrb_value y)
|
||||
else {
|
||||
mpz_add_int(mrb, &z, n<0 ? -n : n);
|
||||
}
|
||||
struct RBigint *v = bint_new(mrb, &z);
|
||||
return mrb_obj_value(v);
|
||||
}
|
||||
}
|
||||
y = mrb_as_bint(mrb, y);
|
||||
|
||||
Reference in New Issue
Block a user