dovecot-2.2: lib-storage: If storage creation fails, destroy all...

dovecot at dovecot.org dovecot at dovecot.org
Thu Nov 13 09:15:26 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/fab74a2b7468
changeset: 18082:fab74a2b7468
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 13 11:14:08 2014 +0200
description:
lib-storage: If storage creation fails, destroy all the already created namespaces/storages.

diffstat:

 src/lib-storage/mail-namespace.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 02f705783387 -r fab74a2b7468 src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c	Thu Nov 13 10:57:07 2014 +0200
+++ b/src/lib-storage/mail-namespace.c	Thu Nov 13 11:14:08 2014 +0200
@@ -387,8 +387,10 @@
 		if (mail_namespaces_init_add(user, ns_set[i],
 					     unexpanded_ns_set[i],
 					     ns_p, error_r) < 0) {
-			if (!ns_set[i]->ignore_on_failure)
+			if (!ns_set[i]->ignore_on_failure) {
+				mail_namespaces_deinit(&namespaces);
 				return -1;
+			}
 			if (mail_set->mail_debug) {
 				i_debug("Skipping namespace %s: %s",
 					ns_set[i]->prefix, *error_r);


More information about the dovecot-cvs mailing list