]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
*-login: Don't leak client when it's aborted while waiting for reply from master.
authorTimo Sirainen <tss@iki.fi>
Thu, 10 Sep 2009 22:51:09 +0000 (18:51 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 10 Sep 2009 22:51:09 +0000 (18:51 -0400)
--HG--
branch : HEAD

src/login-common/client-common.c

index a283526bd83df7412cdc51c635378d3b6a3b83f4..36011a88182072e085c7ee1b7c99da724e96bc84 100644 (file)
@@ -124,7 +124,10 @@ void client_destroy(struct client *client, const char *reason)
        if (client->master_tag != 0) {
                i_assert(client->auth_request == NULL);
                i_assert(client->authenticating);
+               i_assert(client->refcount > 1);
+               client->authenticating = FALSE;
                master_auth_request_abort(master_service, client->master_tag);
+               client->refcount--;
        } else if (client->auth_request != NULL) {
                i_assert(client->authenticating);
                sasl_server_auth_abort(client);