From: Timo Sirainen Date: Fri, 4 Jun 2010 15:15:28 +0000 (+0100) Subject: auth: Deinit auth request handler before pass/userdbs X-Git-Tag: 2.0.beta6~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=304eae229e1e3cc02044f94a8f3a057c6345030e;p=thirdparty%2Fdovecot%2Fcore.git auth: Deinit auth request handler before pass/userdbs --HG-- branch : HEAD --- diff --git a/src/auth/main.c b/src/auth/main.c index 66906e1472..eed2bb6d2a 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -160,8 +160,13 @@ static void main_deinit(void) auth_master_connections_deinit(); auth_worker_server_deinit(); - auths_deinit(); auth_request_handler_deinit(); + /* there may still be some async auth requests left, but above + functions should have marked all of them as destroyed. pass/userdb + deinits should abort the pending requests, which still triggers + callbacks, which should avoid crashes by checking the destroyed + state. */ + auths_deinit(); passdb_cache_deinit(); mech_register_deinit(&mech_reg);