dovecot-2.0: pop3: Don't crash if client disconnects in output h...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Oct 19 22:20:55 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/5f9919f9e321
changeset: 12315:5f9919f9e321
user: Timo Sirainen <tss at iki.fi>
date: Tue Oct 19 20:20:18 2010 +0100
description:
pop3: Don't crash if client disconnects in output handler.
diffstat:
src/pop3/pop3-client.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r f7f2edaf6dca -r 5f9919f9e321 src/pop3/pop3-client.c
--- a/src/pop3/pop3-client.c Tue Oct 19 19:27:59 2010 +0100
+++ b/src/pop3/pop3-client.c Tue Oct 19 20:20:18 2010 +0100
@@ -662,8 +662,12 @@
client->io = io_add(i_stream_get_fd(client->input),
IO_READ, client_input, client);
}
- if (client->io != NULL && client->waiting_input)
- client_input(client);
+ if (client->io != NULL && client->waiting_input) {
+ if (!client_handle_input(client)) {
+ /* client got destroyed */
+ return 1;
+ }
+ }
}
o_stream_uncork(client->output);
More information about the dovecot-cvs
mailing list