From: Aki Tuomi Date: Sat, 17 Sep 2016 09:57:00 +0000 (+0300) Subject: auth-policy: Ref/unref auth request X-Git-Tag: 2.3.0.rc1~3011 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=609bea0534dffe2b8a34a93b0346b1f938903f16;p=thirdparty%2Fdovecot%2Fcore.git auth-policy: Ref/unref auth request If auth_request is not referenced it can go away before HTTP response is handled. --- diff --git a/src/auth/auth-policy.c b/src/auth/auth-policy.c index c07ac343bc..604b0d18f2 100755 --- a/src/auth/auth-policy.c +++ b/src/auth/auth-policy.c @@ -227,6 +227,8 @@ void auth_policy_finish(void *ctx) } if (context->http_request != NULL) http_client_request_abort(&(context->http_request)); + if (context->request != NULL) + auth_request_unref(&context->request); } static @@ -391,6 +393,7 @@ void auth_policy_send_request(struct policy_lookup_ctx *context) http_client_request_set_payload(context->http_request, is, FALSE); i_stream_unref(&is); http_client_request_submit(context->http_request); + auth_request_ref(context->request); } static