summaryrefslogtreecommitdiffhomepage
path: root/src/dump.c
diff options
context:
space:
mode:
authorcremno <[email protected]>2015-07-16 04:58:21 +0200
committercremno <[email protected]>2015-07-16 04:58:21 +0200
commit0f284091d161dbca6e07de85896cbdc9abd2de6b (patch)
treefe737bb4403b500b2c3ccf851dfb6159533912c9 /src/dump.c
parent207577f0af72874d9d643f2c46b881a9159d42d7 (diff)
downloadmruby-0f284091d161dbca6e07de85896cbdc9abd2de6b.tar.gz
mruby-0f284091d161dbca6e07de85896cbdc9abd2de6b.zip
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.
Diffstat (limited to 'src/dump.c')
-rw-r--r--src/dump.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dump.c b/src/dump.c
index 2f2e5edcb..462e036b4 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -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;
}