summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/mrbc/mrbc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c
index 27e151ad2..46d0d95ca 100644
--- a/tools/mrbc/mrbc.c
+++ b/tools/mrbc/mrbc.c
@@ -212,11 +212,10 @@ load_file(mrb_state *mrb, struct mrbc_args *args)
result = mrb_load_file_cxt(mrb, infile, c);
if (need_close) fclose(infile);
- if (mrb_undef_p(result) || mrb_fixnum(result) < 0) {
- mrbc_context_free(mrb, c);
+ mrbc_context_free(mrb, c);
+ if (mrb_undef_p(result)) {
return mrb_nil_value();
}
- mrbc_context_free(mrb, c);
return result;
}