]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: main - Free the auths only once requests are truly gone
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 27 Feb 2025 20:42:43 +0000 (21:42 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Oct 2025 08:41:22 +0000 (08:41 +0000)
src/auth/main.c

index 11a5da56015deec2b369b4d435ca391e4d9ee56b..c8aae2bc19ab5054ad0d0150aff8b02ec31528b0 100644 (file)
@@ -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);