diff --git a/ChangeLog b/ChangeLog index d8f0c84d85..34246707c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Fri Oct 29 10:00:30 2004 Yukihiro Matsumoto + * eval.c (rb_thread_start_0): forget to free some memory chunks. + [ruby-core:03611] + * eval.c (ruby_cleanup): ruby_finalize_1 may cause exception, should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627] diff --git a/eval.c b/eval.c index 530662fdc2..9bf2410ddc 100644 --- a/eval.c +++ b/eval.c @@ -11385,13 +11385,8 @@ rb_thread_start_0(fn, arg, th) if (th == main_thread) ruby_stop(state); rb_thread_remove(th); - for (block = saved_block; block;) { - struct BLOCK *tmp = block; - - if (tmp->frame.argc > 0) - free(tmp->frame.argv); - block = tmp->prev; - free((void*)tmp); + if (saved_block) { + blk_free(saved_block); } if (state && status != THREAD_TO_KILL && !NIL_P(ruby_errinfo)) {