Commit 1251b0d5 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2542 from cubicdaiya/issues/mrb_pool_realloc_error_handlings

Fix error handling for mrb_pool_realloc().
parents bceaade1 5ee00453
......@@ -166,6 +166,9 @@ mrb_pool_realloc(mrb_pool *pool, void *p, size_t oldlen, size_t newlen)
page = page->next;
}
np = mrb_pool_alloc(pool, newlen);
if (np == NULL) {
return NULL;
}
memcpy(np, p, oldlen);
return np;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment