mirror of
https://github.com/janet-lang/janet
synced 2025-08-30 09:28:03 +00:00
Fix memory leak with threaded channels.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user