Skip to content

Commit c36c80b

Browse files
committed
Always free the main thread in RUBY_FREE_AT_EXIT
1 parent 1f0da24 commit c36c80b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

vm.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3343,10 +3343,8 @@ ruby_vm_destruct(rb_vm_t *vm)
33433343
rb_objspace_free_objects(objspace);
33443344
rb_free_generic_fields_tbl_();
33453345
rb_free_default_rand_key();
3346-
if (th && vm->fork_gen == 0) {
3347-
/* If we have forked, main_thread may not be the initial thread */
3348-
ruby_mimfree(th);
3349-
}
3346+
3347+
ruby_mimfree(th);
33503348
}
33513349
rb_objspace_free(objspace);
33523350
}

0 commit comments

Comments
 (0)