diff --git a/vlib/coroutines/coroutines.v b/vlib/coroutines/coroutines.v index 98a79a39fece71..98f36f862ef148 100644 --- a/vlib/coroutines/coroutines.v +++ b/vlib/coroutines/coroutines.v @@ -31,7 +31,7 @@ fn init() { } dealloc := fn (_ voidptr, stack_ptr voidptr, stack_size int) { unsafe { - C.GC_add_roots(stack_ptr, charptr(stack_ptr) + stack_size) + C.GC_remove_roots(stack_ptr, charptr(stack_ptr) + stack_size) free(stack_ptr) } }