summaryrefslogtreecommitdiffhomepage
path: root/tools/mrbc
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-05-22 11:01:29 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2012-05-22 11:01:29 -0700
commit9a645981211703693ee8741976eff8d761defa93 (patch)
tree35c488762d4133f752cd440d48b6634b8df20164 /tools/mrbc
parent55920a784664e8e00317677965d974c733592393 (diff)
parentd1cd10421f8bfeee791ea7ecd1674eccd00000ae (diff)
downloadmruby-9a645981211703693ee8741976eff8d761defa93.tar.gz
mruby-9a645981211703693ee8741976eff8d761defa93.zip
Merge pull request #180 from mitchblank/master
call mrb_close() in tools and test programs
Diffstat (limited to 'tools/mrbc')
-rw-r--r--tools/mrbc/mrbc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c
index dd210bfa9..e711b69cb 100644
--- a/tools/mrbc/mrbc.c
+++ b/tools/mrbc/mrbc.c
@@ -163,12 +163,14 @@ main(int argc, char **argv)
if (n < 0 || args.rfp == NULL) {
cleanup(&args);
usage(argv[0]);
+ mrb_close(mrb);
return n;
}
p = mrb_parse_file(mrb, args.rfp);
if (!p || !p->tree || p->nerr) {
cleanup(&args);
+ mrb_close(mrb);
return -1;
}
@@ -183,6 +185,7 @@ main(int argc, char **argv)
if (n < 0 || args.check_syntax) {
cleanup(&args);
+ mrb_close(mrb);
return n;
}
if (args.initname) {
@@ -196,6 +199,7 @@ main(int argc, char **argv)
}
cleanup(&args);
+ mrb_close(mrb);
return n;
}