dovecot: Crashfix when fscking.

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 15 10:27:33 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/12e12b15f6e3
changeset: 6380:12e12b15f6e3
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 15 10:27:24 2007 +0300
description:
Crashfix when fscking.

diffstat:

1 file changed, 6 insertions(+), 4 deletions(-)
src/lib-index/mail-index-map.c |   10 ++++++----

diffs (20 lines):

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 @@ static int mail_index_map_latest_file(st
 		/* fsck and try again */
 		old_map = index->map;
 		index->map = new_map;
-		ret = mail_index_fsck(index) < 0 ? -1 : 1;
-
-		/* fsck cloned the map, so we'll have to update it */
-		mail_index_unmap(&new_map);
+		if (mail_index_fsck(index) < 0) {
+			ret = -1;
+			break;
+		}
+
+		/* fsck replaced the map */
 		new_map = index->map;
 		index->map = old_map;
 	}


More information about the dovecot-cvs mailing list