]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Dropping connections from sql connection pool could have crashed.
authorTimo Sirainen <tss@iki.fi>
Sun, 17 May 2009 21:30:58 +0000 (17:30 -0400)
committerTimo Sirainen <tss@iki.fi>
Sun, 17 May 2009 21:30:58 +0000 (17:30 -0400)
--HG--
branch : HEAD

src/lib-sql/sql-pool.c

index 397d20ae231395d6195c3d870a61cbef90b7300b..f2e4eab454c1ac6e1881df2d69be20a71645cfb2 100644 (file)
@@ -61,7 +61,7 @@ static void sql_pool_unlink(struct sql_pool_context *ctx)
        if (ctx->next == NULL)
                ctx->pool->unused_head = ctx->prev;
        else {
-               next_ctx = SQL_POOL_CONTEXT(ctx->prev);
+               next_ctx = SQL_POOL_CONTEXT(ctx->next);
                next_ctx->prev = ctx->prev;
        }
        ctx->pool->unused_count--;