From c109ea07da7a28e071db00144fd0b87e9fa14542 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 9 Nov 2020 16:46:04 +0100 Subject: [PATCH] daemon/io refactor: don't expose unused io_deinit() --- daemon/io.c | 2 +- daemon/io.h | 1 - daemon/worker.c | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/daemon/io.c b/daemon/io.c index f02e6568d..28894da65 100644 --- a/daemon/io.c +++ b/daemon/io.c @@ -912,7 +912,7 @@ int io_create(uv_loop_t *loop, uv_handle_t *handle, int type, unsigned family, b return ret; } -void io_deinit(uv_handle_t *handle) +static void io_deinit(uv_handle_t *handle) { if (!handle || !handle->data) { return; diff --git a/daemon/io.h b/daemon/io.h index c83eabd62..ff9ba0bce 100644 --- a/daemon/io.h +++ b/daemon/io.h @@ -42,7 +42,6 @@ void tcp_timeout_trigger(uv_timer_t *timer); * \param has_tls has meanings only when type is SOCK_STREAM */ int io_create(uv_loop_t *loop, uv_handle_t *handle, int type, unsigned family, bool has_tls, bool has_http); -void io_deinit(uv_handle_t *handle); void io_free(uv_handle_t *handle); int io_start_read(uv_handle_t *handle); diff --git a/daemon/worker.c b/daemon/worker.c index 17292a93a..6028c0e0d 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -184,8 +184,7 @@ static uv_handle_t *ioreq_spawn(struct worker_ctx *worker, } if (ret != 0) { - io_deinit(handle); - free(handle); + io_free(handle); return NULL; } -- 2.47.2