dovecot-1.2: Don't (double) free mail_user if namespace initiali...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 24 03:05:35 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/27322203d925
changeset: 9158:27322203d925
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jun 23 20:05:29 2009 -0400
description:
Don't (double) free mail_user if namespace initialization fails.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-storage/mail-namespace.c |    2 +-

diffs (19 lines):

diff -r d14e8b8df025 -r 27322203d925 src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c	Mon Jun 22 01:49:30 2009 -0400
+++ b/src/lib-storage/mail-namespace.c	Tue Jun 23 20:05:29 2009 -0400
@@ -45,6 +45,7 @@ namespace_add_env(const char *data, unsi
 	const char *sep, *type, *prefix, *driver, *error, *list, *alias_for;
 
 	ns = i_new(struct mail_namespace, 1);
+	ns->user = user;
 
 	sep = getenv(t_strdup_printf("NAMESPACE_%u_SEP", num));
 	type = getenv(t_strdup_printf("NAMESPACE_%u_TYPE", num));
@@ -111,7 +112,6 @@ namespace_add_env(const char *data, unsi
 	if (sep != NULL)
 		ns->sep = *sep;
 	ns->prefix = i_strdup(prefix);
-	ns->user = user;
 
 	if (ns->type == NAMESPACE_SHARED && strchr(ns->prefix, '%') != NULL) {
 		/* dynamic shared namespace */


More information about the dovecot-cvs mailing list