summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-19 11:40:37 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-09 20:11:34 +0900
commit2a83650b0fd25719fb6c03bfec7bd895734d3ceb (patch)
tree502ebbfaf3594f318f543478e2cc1fe21c0cde45 /vm.c
parent7110795f37d2b91bb41458c351b5a206424d6ec4 (diff)
Destroy VM-wise locks before freeing [Bug #15852]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4249
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 ef1bf0f..6b8119b 100644
--- a/vm.c
+++ b/vm.c
@@ -2664,6 +2664,8 @@ ruby_vm_destruct(rb_vm_t *vm)
if (objspace) {
rb_objspace_free(objspace);
}
+ rb_native_mutex_destroy(&vm->waitpid_lock);
+ rb_native_mutex_destroy(&vm->workqueue_lock);
/* after freeing objspace, you *can't* use ruby_xfree() */
ruby_mimfree(vm);
ruby_current_vm_ptr = NULL;