]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
LAYOUT=index: Fix crash in doveadm force-resync if storage doesn't implement list_ind...
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 13 Dec 2017 13:48:17 +0000 (15:48 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 9 Feb 2018 13:27:47 +0000 (15:27 +0200)
Broken by recent changes.

src/lib-storage/list/mailbox-list-index-backend.c

index 1fa57e92dd7cdfa134846189b64e29db50778c18..f5b69a807f9834ee6bfc1a2a575753be3549139e 100644 (file)
@@ -582,7 +582,8 @@ void mailbox_list_index_backend_sync_init(struct mailbox *box,
            !ilist->force_resynced) {
                box->storage->list_index_rebuild_reason =
                        MAIL_STORAGE_LIST_INDEX_REBUILD_REASON_FORCE_RESYNC;
-               if (box->storage->v.list_index_corrupted(box->storage) < 0)
+               if (box->storage->v.list_index_corrupted != NULL &&
+                   box->storage->v.list_index_corrupted(box->storage) < 0)
                        ilist->force_resync_failed = TRUE;
                /* try to rebuild list index only once - even if it failed */
                ilist->force_resynced = TRUE;