From 49df2179578c34caefbe693a0eb74facb3ff9679 Mon Sep 17 00:00:00 2001 From: takahashim Date: Sat, 2 Jun 2012 01:14:45 +0900 Subject: use mrb_malloc instead of malloc --- src/struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/struct.c b/src/struct.c index d06124b50..fbe018930 100644 --- a/src/struct.c +++ b/src/struct.c @@ -416,7 +416,7 @@ mrb_struct_initialize_withArg(mrb_state *mrb, int argc, mrb_value *argv, mrb_val mrb_raise(mrb, E_ARGUMENT_ERROR, "struct size differs"); } st = RSTRUCT(self); - st->ptr = malloc(sizeof(mrb_value)*argc); + st->ptr = mrb_malloc(mrb, sizeof(mrb_value)*argc); st->len = n; memcpy(st->ptr, argv, sizeof(mrb_value)*argc); //if (n > argc) { -- cgit v1.2.3