summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index e522c9f300..1fe25a1ca3 100644
--- a/vm.c
+++ b/vm.c
@@ -1498,6 +1498,8 @@ ruby_vm_destruct(void *ptr)
st_free_table(vm->living_threads);
vm->living_threads = 0;
}
+ rb_thread_lock_unlock(&vm->global_vm_lock);
+ rb_thread_lock_destroy(&vm->global_vm_lock);
ruby_xfree(vm);
ruby_current_vm = 0;
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE