Skip to content

Commit c0b32d4

Browse files
Possible fix for #1772 (#1773)
1 parent b070f95 commit c0b32d4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/core/gc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ static void janet_deinit_block(JanetGCObject *mem) {
336336
if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
337337
janet_ev_dec_refcount();
338338
janet_free(f->ev_state);
339+
} else if (f->gc.flags & JANET_FIBER_EV_FLAG_SUSPENDED) {
340+
janet_ev_dec_refcount();
339341
}
340342
#endif
341343
janet_free(f->data);

0 commit comments

Comments
 (0)