summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-01-17 15:55:08 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-01-19 10:25:02 -0500
commitd0b774cfb8ddf075c23d1b5ab1fc6f47123ccf65 (patch)
tree09b3712a3bb799c88ac04f05e21be9a9dcae4936 /vm.c
parentd29cd972f704b42a25a8de2e5f5380f8aee3144a (diff)
Remove null checks for xfree
xfree can handle null values, so we don't need to check it.
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vm.c b/vm.c
index 98e280bf28..e275aa5be4 100644
--- a/vm.c
+++ b/vm.c
@@ -3443,9 +3443,7 @@ thread_free(void *ptr)
rb_bug("thread_free: keeping_mutexes must be NULL (%p:%p)", (void *)th, (void *)th->keeping_mutexes);
}
- if (th->specific_storage) {
- ruby_xfree(th->specific_storage);
- }
+ ruby_xfree(th->specific_storage);
rb_threadptr_root_fiber_release(th);