]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/io refactor: don't expose unused io_deinit() obs-knot-resolver-bs4hbr/deployments/1235
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 9 Nov 2020 15:46:04 +0000 (16:46 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 10 Nov 2020 16:16:47 +0000 (17:16 +0100)
daemon/io.c
daemon/io.h
daemon/worker.c

index f02e6568de4179f4d57a813333198cca409722c5..28894da6579638b16e996b7341ab85ee3b330c36 100644 (file)
@@ -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;
index c83eabd623f26686be23ee6cc3375e4684cd570d..ff9ba0bcea2a53f3616610de8dbd3874be39615e 100644 (file)
@@ -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);
index 17292a93af1461dac347cf63290fc9c9072e02b8..6028c0e0df231bfe050bf920506e972b2198c613 100644 (file)
@@ -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;
        }