Remove meaningless NULL checks
In this context, `th` must not be NULL
This commit is contained in:
parent
200f93b064
commit
59f7a5d336
Notes:
git
2024-12-04 03:15:42 +00:00
12
vm.c
12
vm.c
@ -3104,20 +3104,16 @@ ruby_vm_destruct(rb_vm_t *vm)
|
|||||||
rb_id_table_free(vm->constant_cache);
|
rb_id_table_free(vm->constant_cache);
|
||||||
st_free_table(vm->unused_block_warning_table);
|
st_free_table(vm->unused_block_warning_table);
|
||||||
|
|
||||||
if (th) {
|
xfree(th->nt);
|
||||||
xfree(th->nt);
|
th->nt = NULL;
|
||||||
th->nt = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef HAVE_SETPROCTITLE
|
#ifndef HAVE_SETPROCTITLE
|
||||||
ruby_free_proctitle();
|
ruby_free_proctitle();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (th) {
|
rb_fiber_reset_root_local_storage(th);
|
||||||
rb_fiber_reset_root_local_storage(th);
|
thread_free(th);
|
||||||
thread_free(th);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct rb_objspace *objspace = vm->gc.objspace;
|
struct rb_objspace *objspace = vm->gc.objspace;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user