]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: kqueue/threads: Don't forget to close kqueue_fd[tid] on each thread
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Jan 2018 15:32:18 +0000 (16:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 25 Jan 2018 16:52:57 +0000 (17:52 +0100)
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

index 532d49dffaca2079ef93332695722fa55fb9095b..d58bc4ab4e848c8875b50e1b92752452fce7fe55 100644 (file)
@@ -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;
 }