[dovecot-cvs] dovecot/src/lib module-dir.c,1.29,1.30

tss at dovecot.org tss at dovecot.org
Fri Feb 16 18:44:09 UTC 2007


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

Modified Files:
	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.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- module-dir.c	16 Feb 2007 17:55:42 -0000	1.29
+++ module-dir.c	16 Feb 2007 18:43:36 -0000	1.30
@@ -294,6 +294,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