]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix crash in obox's dsync-merge
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 13 Dec 2016 14:04:53 +0000 (16:04 +0200)
committerGitLab <gitlab@git.dovecot.net>
Wed, 14 Dec 2016 17:35:55 +0000 (19:35 +0200)
src/lib-storage/list/mailbox-list-index-backend.c

index d37e30494741362c6dfb80d48b4716a989046608..cf8d7ccf179f27c2920282a6b9c936d6ba251a40 100644 (file)
@@ -516,6 +516,12 @@ static int index_list_mailbox_open(struct mailbox *box)
        if (ibox->module_ctx.super.open(box) < 0)
                return -1;
 
+       if (box->view == NULL) {
+               /* FIXME: dsync-merge is performing a delete in obox - remove
+                  this check once dsync-merging is no longer used. */
+               return 0;
+       }
+
        /* if mailbox name has changed, update it to the header. Use \0
           as the hierarchy separator in the header. This is to make sure
           we don't keep rewriting the name just in case some backend switches