Commit 81b68958 authored by Masaki Muranaka's avatar Masaki Muranaka

Merge branch 'master' of github.com:mruby/mruby into pr-strict-error-checking

parents 0b337acc 2c6d34f1
...@@ -167,8 +167,7 @@ make_cdump_irep(mrb_state *mrb, int irep_no, FILE *f) ...@@ -167,8 +167,7 @@ make_cdump_irep(mrb_state *mrb, int irep_no, FILE *f)
else else
SOURCE_CODE0(""); SOURCE_CODE0("");
if (buf) mrb_free(mrb, buf);
mrb_free(mrb, buf);
return MRB_CDUMP_OK; return MRB_CDUMP_OK;
} }
......
...@@ -412,8 +412,7 @@ write_pool_block(mrb_state *mrb, mrb_irep *irep, char *buf, int type) ...@@ -412,8 +412,7 @@ write_pool_block(mrb_state *mrb, mrb_irep *irep, char *buf, int type)
} }
error_exit: error_exit:
if (char_buf) mrb_free(mrb, char_buf);
mrb_free(mrb, char_buf);
return (int)(buf - buf_top); return (int)(buf - buf_top);
} }
...@@ -460,8 +459,7 @@ write_syms_block(mrb_state *mrb, mrb_irep *irep, char *buf, int type) ...@@ -460,8 +459,7 @@ write_syms_block(mrb_state *mrb, mrb_irep *irep, char *buf, int type)
} }
error_exit: error_exit:
if (char_buf) mrb_free(mrb, char_buf);
mrb_free(mrb, char_buf);
return (int)(buf - buf_top); return (int)(buf - buf_top);
} }
......
...@@ -238,8 +238,7 @@ load_rite_irep_record(mrb_state *mrb, RiteFILE* rfp, unsigned char* dst, uint32_ ...@@ -238,8 +238,7 @@ load_rite_irep_record(mrb_state *mrb, RiteFILE* rfp, unsigned char* dst, uint32_
*len = dst - pStart; *len = dst - pStart;
error_exit: error_exit:
if (char_buf) mrb_free(mrb, char_buf);
mrb_free(mrb, char_buf);
return MRB_DUMP_OK; return MRB_DUMP_OK;
} }
...@@ -298,8 +297,7 @@ mrb_read_irep_file(mrb_state *mrb, FILE* fp) ...@@ -298,8 +297,7 @@ mrb_read_irep_file(mrb_state *mrb, FILE* fp)
ret = mrb_read_irep(mrb, (char*)rite_dst); ret = mrb_read_irep(mrb, (char*)rite_dst);
error_exit: error_exit:
if (rite_dst) mrb_free(mrb, rite_dst);
mrb_free(mrb, rite_dst);
return ret; return ret;
} }
...@@ -499,8 +497,7 @@ read_rite_irep_record(mrb_state *mrb, unsigned char *src, uint32_t* len) ...@@ -499,8 +497,7 @@ read_rite_irep_record(mrb_state *mrb, unsigned char *src, uint32_t* len)
*len = src - recordStart; *len = src - recordStart;
error_exit: error_exit:
if (buf) mrb_free(mrb, buf);
mrb_free(mrb, buf);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment