From: Timo Sirainen Date: Mon, 9 Aug 2021 10:01:12 +0000 (+0300) Subject: indexer: Fix crash if client disconnects while it's waiting for command reply X-Git-Tag: 2.3.17~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97367ef61784a364ccf615cb816be6492329050d;p=thirdparty%2Fdovecot%2Fcore.git indexer: Fix crash if client disconnects while it's waiting for command reply This happened for example if IMAP SEARCH triggered long fts indexing and the IMAP client disconnected while waiting for the reply. Broken by f62a25849358e40a08a2c47f5bcaa1613a31d076 --- diff --git a/src/indexer/indexer-client.c b/src/indexer/indexer-client.c index c5aac8a3da..ab4710778a 100644 --- a/src/indexer/indexer-client.c +++ b/src/indexer/indexer-client.c @@ -139,7 +139,7 @@ void indexer_client_status_callback(int percentage, void *context) struct indexer_client_request *ctx = context; /* we are in deinit already, or the client has disconnected */ - if (ctx->client == NULL) + if (ctx->client->conn.output == NULL) return; T_BEGIN {