Merge pull request #1202 from masahino/fix_load.c

fix unnecessary irep_free on load.c
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-04-23 18:54:49 -07:00
+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;