dovecot-2.1: autocreate: Make sure we don't crash if there are n...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Dec 5 21:25:27 EET 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/3054d73cf293
changeset: 13798:3054d73cf293
user: Timo Sirainen <tss at iki.fi>
date: Mon Dec 05 21:25:22 2011 +0200
description:
autocreate: Make sure we don't crash if there are no mailbox{}es.
diffstat:
src/plugins/autocreate/autocreate-plugin.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r 272b705f0938 -r 3054d73cf293 src/plugins/autocreate/autocreate-plugin.c
--- a/src/plugins/autocreate/autocreate-plugin.c Mon Dec 05 21:23:40 2011 +0200
+++ b/src/plugins/autocreate/autocreate-plugin.c Mon Dec 05 21:25:22 2011 +0200
@@ -67,6 +67,9 @@
static void
autocreate_mail_user_created(struct mail_user *user)
{
+ if (!array_is_created(&user->set->mailboxes))
+ p_array_init(&user->set->mailboxes, user->pool, 16);
+
read_autobox_settings(user, "autocreate", FALSE);
read_autobox_settings(user, "autosubscribe", TRUE);
}
More information about the dovecot-cvs
mailing list