[dovecot-cvs] dovecot/src/lib module-dir.c,1.19.2.6,1.19.2.7

tss at dovecot.org tss at dovecot.org
Fri Feb 16 18:43:42 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv31703

Modified Files:
      Tag: branch_1_0
	module-dir.c 
Log Message:
Don't crash at deinit if no modules are loaded.



Index: module-dir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/module-dir.c,v
retrieving revision 1.19.2.6
retrieving revision 1.19.2.7
diff -u -d -r1.19.2.6 -r1.19.2.7
--- module-dir.c	16 Feb 2007 17:55:39 -0000	1.19.2.6
+++ module-dir.c	16 Feb 2007 18:43:38 -0000	1.19.2.7
@@ -295,6 +295,9 @@
 	for (module = modules; module != NULL; module = module->next)
 		count++;
 
+	if (count == 0)
+		return;
+
 	/* @UNSAFE: deinitialize in reverse order */
 	t_push();
 	rev = t_new(struct module *, count);



More information about the dovecot-cvs mailing list