From: Vladimír Čunát Date: Mon, 9 Nov 2020 15:46:04 +0000 (+0100) Subject: daemon/io refactor: don't expose unused io_deinit() X-Git-Tag: v5.2.0~1^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fenvironments%2Fobs-knot-resolver-bs4hbr%2Fdeployments%2F1235;p=thirdparty%2Fknot-resolver.git daemon/io refactor: don't expose unused io_deinit() --- 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; }