From: Timo Sirainen Date: Thu, 8 Jan 2009 19:48:18 +0000 (-0500) Subject: mbox: Fixed crash with pop3_lock_session=yes if dotlock already existed. X-Git-Tag: 1.2.beta1~140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37a6d98bf032de76c609ceef739b6de44b239263;p=thirdparty%2Fdovecot%2Fcore.git mbox: Fixed crash with pop3_lock_session=yes if dotlock already existed. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/mbox-storage.c b/src/lib-storage/index/mbox/mbox-storage.c index 1f5d34c337..f87119f8f8 100644 --- a/src/lib-storage/index/mbox/mbox-storage.c +++ b/src/lib-storage/index/mbox/mbox-storage.c @@ -576,6 +576,9 @@ mbox_alloc_mailbox(struct mbox_storage *storage, struct mail_index *index, if ((storage->storage.flags & MAIL_STORAGE_FLAG_KEEP_HEADER_MD5) != 0) mbox->mbox_save_md5 = TRUE; + index_storage_mailbox_init(&mbox->ibox, name, flags, + want_memory_indexes(storage, path)); + if ((flags & MAILBOX_OPEN_KEEP_LOCKED) != 0) { if (mbox_lock(mbox, F_WRLCK, &mbox->mbox_global_lock_id) <= 0) { struct mailbox *box = &mbox->ibox.box; @@ -591,8 +594,6 @@ mbox_alloc_mailbox(struct mbox_storage *storage, struct mail_index *index, } } - index_storage_mailbox_init(&mbox->ibox, name, flags, - want_memory_indexes(storage, path)); return mbox; }