]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Fix crash when auth worker has already exited when deinitializating connection
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 29 Jun 2023 10:31:09 +0000 (13:31 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 5 Jul 2023 07:21:08 +0000 (10:21 +0300)
Having no connections satisfies the original assertion.

src/auth/auth-worker-connection.c

index 290ebefaa4ccca3ec2e59857ab164e2f2268e552..aed4f6f252ba55ffa805bd1a216aac9fd12d9936 100644 (file)
@@ -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--;
        }