Skip to content

Commit

Permalink
Fix segfault on loading binary RITE files.
Browse files Browse the repository at this point in the history
  • Loading branch information
monaka committed Apr 24, 2013
1 parent 12cc55f commit 92e4374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/load.c
Expand Up @@ -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;
Expand Down

0 comments on commit 92e4374

Please sign in to comment.