]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: io_loop_context_new() - Fix memory leak
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 1 Mar 2021 10:03:45 +0000 (12:03 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 1 Mar 2021 10:03:45 +0000 (12:03 +0200)
Broken by fea09a415cf89223d8b17c5982257c9b3c357cbc

src/lib/ioloop.c

index 1e854c534e9f0fd9eed40f25483749ef7cdbfd03..b3e8ecc2e3dfc099dc83a4eb2ce94b6595f7393a 100644 (file)
@@ -1022,7 +1022,7 @@ struct ioloop_context *io_loop_context_new(struct ioloop *ioloop)
        struct ioloop_context *ctx;
 
        ctx = i_new(struct ioloop_context, 1);
-       ctx->refcount = 2;
+       ctx->refcount = 1;
        ctx->ioloop = ioloop;
        i_array_init(&ctx->callbacks, 4);
        return ctx;