]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: On errors, close sync view before fsck to avoid assert-crash.
authorTimo Sirainen <tss@iki.fi>
Tue, 25 May 2010 14:25:01 +0000 (15:25 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 25 May 2010 14:25:01 +0000 (15:25 +0100)
--HG--
branch : HEAD

src/lib-index/mail-index-sync-update.c

index c861df6b93702242078ff406981192f54be83d6a..5d22cf1b8999b52415c217e278484ff854e24aee 100644 (file)
@@ -959,12 +959,12 @@ int mail_index_sync_map(struct mail_index_map **_map,
                                            map->hdr.log_file_seq, start_offset,
                                            (uint32_t)-1, (uoff_t)-1, &reset);
        if (ret <= 0) {
+               mail_index_view_close(&view);
                if (force && ret == 0) {
                        /* the seq/offset is probably broken */
                        (void)mail_index_fsck(index);
                }
                /* can't use it. sync by re-reading index. */
-               mail_index_view_close(&view);
                return 0;
        }