summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-02 15:39:10 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-02 15:39:10 +0000
commitae1bccf7a49225fdc8a58f9f83926e3d675dc0c2 (patch)
tree2843d2a26ab7d83d5cb775d8e7cf96caf78348ed /gc.c
parent2392f452897ae36b568321a03b7261e787638840 (diff)
Refix r32815.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index fb74b0623a..d893dd7e55 100644
--- a/gc.c
+++ b/gc.c
@@ -1089,8 +1089,9 @@ init_heap(rb_objspace_t *objspace)
{
/* altstack of another threads are allocated in another place */
rb_thread_t *th = GET_THREAD();
- free(th->altstack); /* free previously allocated area */
- th->altstack = xmalloc(ALT_STACK_SIZE);
+ void *tmp = th->altstack;
+ th->altstack = malloc(ALT_STACK_SIZE);
+ free(tmp); /* free previously allocated area */
}
#endif