summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTatsuhiko Kubo <[email protected]>2014-08-26 09:05:12 +0900
committerTatsuhiko Kubo <[email protected]>2014-08-27 18:58:26 +0900
commitcc22ec85b9f1b6bf818fd8d456cc12e1460164c0 (patch)
tree8e55b2b0312274c9a6977a6576ae65ad1c0b297d
parentbf173b320f21573ff3400eca950b4374661895a6 (diff)
downloadmruby-cc22ec85b9f1b6bf818fd8d456cc12e1460164c0.tar.gz
mruby-cc22ec85b9f1b6bf818fd8d456cc12e1460164c0.zip
Use mrb_malloc() instead of mrb_realloc().
-rw-r--r--src/gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gc.c b/src/gc.c
index c33f1e662..30391a081 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -227,7 +227,7 @@ mrb_calloc(mrb_state *mrb, size_t nelem, size_t len)
nelem <= SIZE_MAX / len) {
size_t size;
size = nelem * len;
- p = mrb_realloc(mrb, 0, size);
+ p = mrb_malloc(mrb, size);
memset(p, 0, size);
}