From: Timo Sirainen Date: Wed, 15 Aug 2012 06:35:21 +0000 (+0300) Subject: imap: Fixed assert-crash on FETCH error disconnections. X-Git-Tag: 2.2.alpha1~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4f236f772f2bd00c8e686b7f5f0e68637fa24bc;p=thirdparty%2Fdovecot%2Fcore.git imap: Fixed assert-crash on FETCH error disconnections. --- diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index 66b160702e..97867177d3 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -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 */