dovecot-2.0: pop3: Avoid crash when updating proctitle if client...

dovecot at dovecot.org dovecot at dovecot.org
Thu Nov 18 20:57:22 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/9c96b54c8a76
changeset: 12445:9c96b54c8a76
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 18 18:57:18 2010 +0000
description:
pop3: Avoid crash when updating proctitle if client init fails.

diffstat:

 src/pop3/pop3-client.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 1afad049f37f -r 9c96b54c8a76 src/pop3/pop3-client.c
--- a/src/pop3/pop3-client.c	Thu Nov 18 18:56:34 2010 +0000
+++ b/src/pop3/pop3-client.c	Thu Nov 18 18:57:18 2010 +0000
@@ -252,8 +252,6 @@
 	net_set_nonblock(fd_in, TRUE);
 	net_set_nonblock(fd_out, TRUE);
 
-	pop3_client_count++;
-
 	client = i_new(struct client, 1);
 	client->service_user = service_user;
 	client->set = set;
@@ -274,6 +272,9 @@
 
 	client->user = user;
 
+	pop3_client_count++;
+	DLLIST_PREPEND(&pop3_clients, client);
+
 	inbox = "INBOX";
 	ns = mail_namespace_find(user->namespaces, &inbox);
 	if (ns == NULL) {
@@ -326,7 +327,6 @@
 		client->anvil_sent = TRUE;
 	}
 
-	DLLIST_PREPEND(&pop3_clients, client);
 	if (hook_client_created != NULL)
 		hook_client_created(&client);
 


More information about the dovecot-cvs mailing list