From 0f284091d161dbca6e07de85896cbdc9abd2de6b Mon Sep 17 00:00:00 2001 From: cremno Date: Thu, 16 Jul 2015 04:58:21 +0200 Subject: 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. --- src/dump.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/dump.c') 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; } -- cgit v1.2.3