From 894a3b2fe2c5b6aff6aabcecc585d4c14378c32e Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 15 Aug 2021 15:33:26 -0500 Subject: [PATCH] Fix memory leak with threaded channels. --- src/core/ev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/ev.c b/src/core/ev.c index 698a0b78..2514e1e9 100644 --- a/src/core/ev.c +++ b/src/core/ev.c @@ -746,6 +746,7 @@ static int janet_chanat_gc(void *p, size_t s) { janet_chan_lock(channel); if (--channel->ref_count == 0) { janet_chan_deinit(channel); + janet_free(channel); } else { janet_chan_unlock(channel); }