use mrb_malloc_simple() to allocate crc buffer; close #1302

parent 3ceeb0be
...@@ -565,7 +565,7 @@ mrb_read_irep_file(mrb_state *mrb, FILE* fp) ...@@ -565,7 +565,7 @@ mrb_read_irep_file(mrb_state *mrb, FILE* fp)
fpos = ftell(fp); fpos = ftell(fp);
/* You don't need use SIZE_ERROR as block_size is enough small. */ /* You don't need use SIZE_ERROR as block_size is enough small. */
for (i = 0; i < block_fallback_count; i++,block_size >>= 1){ for (i = 0; i < block_fallback_count; i++,block_size >>= 1){
buf = mrb_malloc(mrb, block_size); buf = mrb_malloc_simple(mrb, block_size);
if (buf) break; if (buf) break;
} }
if (!buf) { if (!buf) {
......
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