[dovecot-cvs] dovecot/src/pop3-login client.c, 1.54, 1.55 pop3-proxy.c, 1.11, 1.12

tss at dovecot.org tss at dovecot.org
Sat Oct 14 00:11:10 UTC 2006


Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv6724/pop3-login

Modified Files:
	client.c pop3-proxy.c 
Log Message:
Reference counter fixing for client while it's being used in login proxy.
Fixes crashes.



Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- client.c	13 Oct 2006 20:06:47 -0000	1.54
+++ client.c	13 Oct 2006 23:11:07 -0000	1.55
@@ -388,6 +388,9 @@
 	if (client->proxy != NULL) {
 		login_proxy_free(client->proxy);
 		client->proxy = NULL;
+
+		i_assert(client->refcount > 1);
+		client_unref(client);
 	}
 
 	if (client->common.proxy != NULL)

Index: pop3-proxy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/pop3-proxy.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pop3-proxy.c	10 Aug 2006 21:15:03 -0000	1.11
+++ pop3-proxy.c	13 Oct 2006 23:11:07 -0000	1.12
@@ -130,6 +130,8 @@
 
 	i_free(client->proxy_user);
 	client->proxy_user = NULL;
+
+	client_unref(client);
 }
 
 int pop3_proxy_new(struct pop3_client *client, const char *host,
@@ -146,6 +148,7 @@
 	i_assert(client->refcount > 1);
 	connection_queue_add(1);
 
+	client_ref(client);
 	client->proxy = login_proxy_new(&client->common, host, port,
 					proxy_input, client);
 	if (client->proxy == NULL)



More information about the dovecot-cvs mailing list