]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login: Crashfix when client disconnects before auth process has started.
authorTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 13:47:28 +0000 (14:47 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 13:47:28 +0000 (14:47 +0100)
src/login-common/client-common-auth.c

index 258ac782ba6e0515cd8e942d78b7e2ef5aab133c..bbc513ad53ed1005de8451f67ec51ab5fc250cdd 100644 (file)
@@ -525,9 +525,11 @@ bool client_check_plaintext_auth(struct client *client, bool pass_sent)
 
 void clients_notify_auth_connected(void)
 {
-       struct client *client;
+       struct client *client, *next;
+
+       for (client = clients; client != NULL; client = next) {
+               next = client->next;
 
-       for (client = clients; client != NULL; client = client->next) {
                if (client->to_auth_waiting != NULL)
                        timeout_remove(&client->to_auth_waiting);
                if (!client->greeting_sent)