From a8e5d337d83d941b60069c3ba5b4f5042863eba7 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Thu, 29 Jun 2023 13:31:09 +0300 Subject: [PATCH] auth: Fix crash when auth worker has already exited when deinitializating connection Having no connections satisfies the original assertion. --- src/auth/auth-worker-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/auth-worker-connection.c b/src/auth/auth-worker-connection.c index 290ebefaa4..aed4f6f252 100644 --- a/src/auth/auth-worker-connection.c +++ b/src/auth/auth-worker-connection.c @@ -263,7 +263,7 @@ static void auth_worker_deinit(struct auth_worker_connection **_worker, if (worker->received_error) { i_assert(auth_workers_with_errors > 0); - i_assert(auth_workers_with_errors <= connections->connections_count); + i_assert(connections == NULL || auth_workers_with_errors <= connections->connections_count); auth_workers_with_errors--; } -- 2.47.3