Free the original pointer if `realloc` failed.
The POSIX `realloc` keep the original pointer untouched, so it can easily leads to memory leakage. `mrb_realloc()` should handle those bookkeeping, while `mrb_realloc_simple()` keeps the original `realloc` behavior.
Showing
Please register or sign in to comment