From 7d54db53955ab7adf20e78c260507beedde4d9f5 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 15 May 2023 17:14:26 +0200 Subject: worker_queue: forgot to close file descriptors in worker_destroy --- src/worker_queue.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/worker_queue.c') diff --git a/src/worker_queue.c b/src/worker_queue.c index 3e207e3..06119e2 100644 --- a/src/worker_queue.c +++ b/src/worker_queue.c @@ -11,6 +11,7 @@ #include #include #include +#include struct worker { pthread_t thread; @@ -37,6 +38,7 @@ void worker_destroy(struct worker *entry) { log("Waiting for worker %d thread to exit\n", entry->fd); pthread_errno_if(pthread_join(entry->thread, NULL), "pthread_join"); + log_errno_if(close(entry->fd), "close"); free(entry); } -- cgit v1.2.3