delete mrb_free()-related non-NULL checks

No need to optimize since a program only exits once and errors are rare.
Also the mruby source code doesn't have these kind of checks elsewhere.

The ones in {Time,Random}#initialize are kept because there it actually
matters
since initialization always happens and re-initialization is unlikely.
This commit is contained in:
cremno
2015-07-16 04:58:21 +02:00
parent 207577f0af
commit 0f284091d1
3 changed files with 5 additions and 11 deletions
+2 -6
View File
@@ -978,12 +978,8 @@ error_exit:
mrb_free(mrb, *bin);
*bin = NULL;
}
if (lv_syms) {
mrb_free(mrb, lv_syms);
}
if (filenames) {
mrb_free(mrb, filenames);
}
mrb_free(mrb, lv_syms);
mrb_free(mrb, filenames);
return result;
}