]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Fixed potential assert-crash on disconnect.
authorTimo Sirainen <tss@iki.fi>
Wed, 20 Aug 2014 13:35:43 +0000 (15:35 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 20 Aug 2014 13:35:43 +0000 (15:35 +0200)
src/pop3/pop3-client.c

index a59dc68d69d81c072411483f274c58a02ff5cd8e..0da577bc2beea145361acbd5db72c0ace4e6a102 100644 (file)
@@ -811,7 +811,8 @@ static int client_output(struct client *client)
 
        if (client->cmd == NULL) {
                if (o_stream_get_buffer_used_size(client->output) <
-                   POP3_OUTBUF_THROTTLE_SIZE/2 && client->io == NULL) {
+                   POP3_OUTBUF_THROTTLE_SIZE/2 && client->io == NULL &&
+                   !client->input->closed) {
                        /* enable input again */
                        client->io = io_add_istream(client->input, client_input,
                                                    client);