mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2451 from take-cheeze/remove_mem_out_check
Remove unnecessary out of memory check in `ary_expand_capa`.
This commit is contained in:
@@ -200,10 +200,6 @@ ary_expand_capa(mrb_state *mrb, struct RArray *a, mrb_int len)
|
||||
if (capa > a->aux.capa) {
|
||||
mrb_value *expanded_ptr = (mrb_value *)mrb_realloc(mrb, a->ptr, sizeof(mrb_value)*capa);
|
||||
|
||||
if (!expanded_ptr) {
|
||||
mrb_raise(mrb, E_RUNTIME_ERROR, "out of memory");
|
||||
}
|
||||
|
||||
a->aux.capa = capa;
|
||||
a->ptr = expanded_ptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user