From: Stephan Bosch Date: Thu, 27 Feb 2025 20:42:43 +0000 (+0100) Subject: auth: main - Free the auths only once requests are truly gone X-Git-Tag: 2.4.2~349 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfc226ef178d31c1cbc6a2bda753a475e52a0e4a;p=thirdparty%2Fdovecot%2Fcore.git auth: main - Free the auths only once requests are truly gone --- diff --git a/src/auth/main.c b/src/auth/main.c index 11a5da5601..c8aae2bc19 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -259,10 +259,8 @@ static void main_deinit(void) auth_worker_connection_deinit(); /* deinit passdbs and userdbs. it aborts any pending async requests. */ auths_deinit(); - /* flush pending requests */ + /* flush pending request failures */ auth_request_handler_deinit(); - /* there are no more auth requests */ - auths_free(); dict_drivers_unregister_builtin(); auth_token_deinit(); @@ -272,9 +270,13 @@ static void main_deinit(void) auth_worker_connections_destroy_all(); auth_policy_deinit(); + db_oauth2_deinit(); + + /* there are no more auth requests */ + auths_free(); + mech_register_deinit(&mech_reg); mech_otp_deinit(); - db_oauth2_deinit(); mech_deinit(global_auth_settings); settings_free(global_auth_settings);