]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fixed assert-crash on FETCH error disconnections.
authorTimo Sirainen <tss@iki.fi>
Wed, 15 Aug 2012 06:35:21 +0000 (09:35 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 15 Aug 2012 06:35:21 +0000 (09:35 +0300)
src/imap/imap-client.c

index 66b160702e24d3dddbffa7a911e66a72285a756e..97867177d35f6b7ad5410986ac25eea409397c99 100644 (file)
@@ -574,7 +574,10 @@ void client_command_free(struct client_command_context **_cmd)
 
        *_cmd = NULL;
 
-       i_assert(client->output_cmd_lock != cmd);
+       if (client->output_cmd_lock == cmd) {
+               i_assert(client->disconnected);
+               client->output_cmd_lock = NULL;
+       }
 
        /* reset input idle time because command output might have taken a
           long time and we don't want to disconnect client immediately then */