]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
indexer: Fix crash if client disconnects while it's waiting for command reply
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 9 Aug 2021 10:01:12 +0000 (13:01 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 11 Aug 2021 12:00:56 +0000 (12:00 +0000)
This happened for example if IMAP SEARCH triggered long fts indexing and the
IMAP client disconnected while waiting for the reply.

Broken by f62a25849358e40a08a2c47f5bcaa1613a31d076

src/indexer/indexer-client.c

index c5aac8a3da40bfa14e08f709fd0de604d0e2ac58..ab4710778acbe3cf2ac882c736fdcde1be1bdc80 100644 (file)
@@ -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 {