From 3e9c3a8f8d49c47418f71ffd50f541ba7f90d22c Mon Sep 17 00:00:00 2001 From: Karl Fleischmann Date: Thu, 24 Mar 2022 10:20:33 +0100 Subject: [PATCH] auth: Handle return value of connection_client_connect() --- src/auth/auth-worker-connection.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/auth/auth-worker-connection.c b/src/auth/auth-worker-connection.c index 853df11721..3de488df3e 100644 --- a/src/auth/auth-worker-connection.c +++ b/src/auth/auth-worker-connection.c @@ -236,7 +236,14 @@ static struct auth_worker_connection *auth_worker_create(void) worker->conn.event_parent = auth_event; connection_init_client_unix(connections, &worker->conn, worker_socket_path); - connection_client_connect(&worker->conn); + if (connection_client_connect(&worker->conn) < 0) { + e_error(worker->conn.event, + "Unable to connect worker: net_connect_unix(%s) failed: %m", + worker->conn.name); + connection_deinit(&worker->conn); + i_free(worker); + return NULL; + } event_set_append_log_prefix(worker->conn.event, "auth-worker: "); -- 2.47.3