dovecot-2.0: auth: Unload modules earlier to avoid crashes.
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Wed Nov 18 01:53:13 EET 2009
    
    
  
details:   http://hg.dovecot.org/dovecot-2.0/rev/3f0752af52db
changeset: 10348:3f0752af52db
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Nov 17 18:53:09 2009 -0500
description:
auth: Unload modules earlier to avoid crashes.
diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
src/auth/main.c |    9 ++++++---
diffs (26 lines):
diff -r 0156d98bc822 -r 3f0752af52db src/auth/main.c
--- a/src/auth/main.c	Tue Nov 17 18:34:29 2009 -0500
+++ b/src/auth/main.c	Tue Nov 17 18:53:09 2009 -0500
@@ -97,16 +97,19 @@ static void main_deinit(void)
 	auth_master_connections_deinit();
         auth_worker_server_deinit();
 
-	userdbs_deinit();
-	passdbs_deinit();
 	mech_deinit(auth->set);
 	auth_deinit(&auth);
 
+	/* allow modules to unregister their dbs/drivers/etc. before freeing
+	   the whole data structures containing them. */
+	module_dir_unload(&modules);
+
+	userdbs_deinit();
+	passdbs_deinit();
         password_schemes_deinit();
 	sql_drivers_deinit();
 	random_deinit();
 
-	module_dir_unload(&modules);
 	array_free(&listen_fd_types);
 }
 
    
    
More information about the dovecot-cvs
mailing list