Fix segfault on loading binary RITE files.

This commit is contained in:
Masaki Muranaka
2013-04-24 11:31:48 +09:00
parent 12cc55fcfa
commit 92e43746e0
+1 -1
View File
@@ -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;