Remove discareded NULL checks.
Use mrb_malloc() instead of mrb_realloc().
Add a missing space after ",".
Merge pull request #2566 from cubicdaiya/issues/null_check

Remove discareded NULL checks and use mrb_malloc() instead of mrb_realloc().
Merge pull request #2567 from cubicdaiya/issues/space_after_comma2

Add a missing space after ",".