From 13b007d583924d19d692268c2f51a2fc2b46fd0c Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 25 Jan 2018 16:32:18 +0100 Subject: [PATCH] BUG/MINOR: kqueue/threads: Don't forget to close kqueue_fd[tid] on each thread in deinit_kqueue_per_thread, kqueue_fd[tid] must be closed, except for the main thread (the first one, tid==0). This patch must be backported in 1.8 with commit 7a2364d4. --- src/ev_kqueue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c index 532d49dff..d58bc4ab4 100644 --- a/src/ev_kqueue.c +++ b/src/ev_kqueue.c @@ -184,6 +184,9 @@ static int init_kqueue_per_thread() static void deinit_kqueue_per_thread() { + if (tid) + close(kqueue_fd[tid]); + free(kev); kev = NULL; }