Mercurial > dovecot > core-2.2
changeset 20886:b88d0049df32
auth-policy: Use request's pool instead of new pool
This fixes existing memory leak in auth_report,
which is caused by using separate memory pool
instead of request's pool.
Thank you for Andrea Carpani for extensive
debugging.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Mon, 17 Oct 2016 19:38:07 +0300 |
parents | 3f713b46d3b3 |
children | ead4bfb88da1 |
files | src/auth/auth-policy.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-policy.c Sun Oct 16 22:58:07 2016 +0300 +++ b/src/auth/auth-policy.c Mon Oct 17 19:38:07 2016 +0300 @@ -526,9 +526,8 @@ if (*(request->set->policy_server_url) == '\0') return; - pool_t pool = pool_alloconly_create("auth policy", 128); - struct policy_lookup_ctx *ctx = p_new(pool, struct policy_lookup_ctx, 1); - ctx->pool = pool; + struct policy_lookup_ctx *ctx = p_new(request->pool, struct policy_lookup_ctx, 1); + ctx->pool = request->pool; ctx->request = request; ctx->expect_result = FALSE; ctx->set = request->set;