[dovecot-cvs] dovecot/src/imap-login imap-proxy.c,1.9,1.10
tss at dovecot.org
tss at dovecot.org
Tue Nov 7 14:01:23 UTC 2006
Update of /var/lib/cvs/dovecot/src/imap-login
In directory talvi:/tmp/cvs-serv17175
Modified Files:
imap-proxy.c
Log Message:
If client disconnects before logging into remote server is complete, don't
crash/leak memory.
Index: imap-proxy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap-login/imap-proxy.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- imap-proxy.c 13 Oct 2006 23:11:09 -0000 1.9
+++ imap-proxy.c 7 Nov 2006 14:01:19 -0000 1.10
@@ -15,6 +15,15 @@
{
string_t *str;
+ if (client->destroyed) {
+ /* client already disconnected. */
+ login_proxy_free(client->proxy);
+ client->proxy = NULL;
+
+ client_unref(client);
+ return -1;
+ }
+
if (!client->proxy_login_sent) {
/* this is a banner */
if (strncmp(line, "* OK ", 5) != 0) {
More information about the dovecot-cvs
mailing list