dovecot-2.1: auth: Keep auth_request referenced during DNS lookup.
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 28 17:33:39 EEST 2013
details: http://hg.dovecot.org/dovecot-2.1/rev/f819e0a3a4df
changeset: 14970:f819e0a3a4df
user: Timo Sirainen <tss at iki.fi>
date: Tue May 28 17:33:35 2013 +0300
description:
auth: Keep auth_request referenced during DNS lookup.
If the underlying auth connection gets closed, there's nothing else
referencing the auth_request.
diffstat:
src/auth/auth-request.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (25 lines):
diff -r c0c5dac8ff48 -r f819e0a3a4df src/auth/auth-request.c
--- a/src/auth/auth-request.c Sun May 26 21:45:33 2013 +0300
+++ b/src/auth/auth-request.c Tue May 28 17:33:35 2013 +0300
@@ -1594,6 +1594,7 @@
}
if (ctx->callback != NULL)
ctx->callback(result->ret == 0, request);
+ auth_request_unref(&request);
i_free(ctx);
}
@@ -1631,11 +1632,13 @@
ctx = i_new(struct auth_request_proxy_dns_lookup_ctx, 1);
ctx->request = request;
+ auth_request_ref(request);
if (dns_lookup(host, &dns_set, auth_request_proxy_dns_callback, ctx) < 0) {
/* failed early */
request->internal_failure = TRUE;
auth_request_proxy_finish_failure(request);
+ auth_request_unref(&request);
return -1;
}
ctx->callback = callback;
More information about the dovecot-cvs
mailing list