Commit 92e43746 authored by Masaki Muranaka's avatar Masaki Muranaka

Fix segfault on loading binary RITE files.

parent 12cc55fc
......@@ -457,7 +457,7 @@ read_rite_section_irep_file(mrb_state *mrb, FILE *fp)
result = sirep + bin_to_uint16(header.sirep);
error_exit:
mrb_free(mrb, buf);
if (result != MRB_DUMP_OK) {
if (result < MRB_DUMP_OK) {
irep_free(sirep, mrb);
}
return result;
......
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