dovecot-2.0: *-login: Don't leak client when it's aborted while ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Sep 11 01:57:00 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/5bcb78c2eabb
changeset: 9921:5bcb78c2eabb
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Sep 10 18:51:09 2009 -0400
description:
*-login: Don't leak client when it's aborted while waiting for reply from master.

diffstat:

1 file changed, 3 insertions(+)
src/login-common/client-common.c |    3 +++

diffs (14 lines):

diff -r b1857ba4347a -r 5bcb78c2eabb src/login-common/client-common.c
--- a/src/login-common/client-common.c	Thu Sep 10 16:49:44 2009 -0400
+++ b/src/login-common/client-common.c	Thu Sep 10 18:51:09 2009 -0400
@@ -124,7 +124,10 @@ void client_destroy(struct client *clien
 	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);


More information about the dovecot-cvs mailing list