summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 1f9d9375dd..a8df3ebd1b 100644
--- a/eval.c
+++ b/eval.c
@@ -11473,6 +11473,10 @@ rb_thread_start_0(fn, arg, th)
if (th == main_thread) ruby_stop(state);
rb_thread_remove(th);
+ if (saved_block) {
+ blk_free(saved_block);
+ }
+
if (state && status != THREAD_TO_KILL && !NIL_P(ruby_errinfo)) {
th->flags |= THREAD_RAISED;
if (state == TAG_FATAL) {