# HG changeset patch # User Timo Sirainen # Date 1189841244 -10800 # Node ID 12e12b15f6e3472e08a5ede24a6a0c0772cafbe3 # Parent b734f6cf4bd8956470cbbc37ca356bd805a03801 Crashfix when fscking. diff -r b734f6cf4bd8 -r 12e12b15f6e3 src/lib-index/mail-index-map.c --- a/src/lib-index/mail-index-map.c Sat Sep 15 10:20:02 2007 +0300 +++ b/src/lib-index/mail-index-map.c Sat Sep 15 10:27:24 2007 +0300 @@ -805,10 +805,12 @@ /* fsck and try again */ old_map = index->map; index->map = new_map; - ret = mail_index_fsck(index) < 0 ? -1 : 1; + if (mail_index_fsck(index) < 0) { + ret = -1; + break; + } - /* fsck cloned the map, so we'll have to update it */ - mail_index_unmap(&new_map); + /* fsck replaced the map */ new_map = index->map; index->map = old_map; }