changeset 6380:12e12b15f6e3 HEAD

Crashfix when fscking.
author Timo Sirainen <tss@iki.fi>
date Sat, 15 Sep 2007 10:27:24 +0300
parents b734f6cf4bd8
children 3ea531c2bf63
files src/lib-index/mail-index-map.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	}