]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
indexer: Fix memory leak on indexer timeout
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 7 Feb 2022 15:04:41 +0000 (16:04 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 9 Feb 2022 19:08:00 +0000 (19:08 +0000)
src/indexer/indexer-client.c

index ab4710778acbe3cf2ac882c736fdcde1be1bdc80..bd65b5efc5e67806fe8a9ec4118b0199a086321e 100644 (file)
@@ -139,8 +139,11 @@ 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->conn.output == NULL)
+       if (ctx->client->conn.output == NULL) {
+               indexer_client_unref(ctx->client);
+               i_free(ctx);
                return;
+       }
 
        T_BEGIN {
                o_stream_nsend_str(ctx->client->conn.output,