From: Aki Tuomi Date: Thu, 29 Jun 2023 10:31:09 +0000 (+0300) Subject: auth: Fix crash when auth worker has already exited when deinitializating connection X-Git-Tag: 2.4.0~2664 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8e5d337d83d941b60069c3ba5b4f5042863eba7;p=thirdparty%2Fdovecot%2Fcore.git auth: Fix crash when auth worker has already exited when deinitializating connection Having no connections satisfies the original assertion. --- 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--; }