Fix memory leaks in mirb.

This commit is contained in:
take-cheeze
2018-06-20 18:15:04 +09:00
parent 5e7ced0785
commit 26d143bda8
+6
View File
@@ -661,6 +661,12 @@ done:
if (args.rfp) fclose(args.rfp);
mrb_free(mrb, args.argv);
if (args.libv) {
for (i = 0; i < args.libc; ++i) {
mrb_free(mrb, args.libv[i]);
}
mrb_free(mrb, args.libv);
}
mrbc_context_free(mrb, cxt);
mrb_close(mrb);