dovecot: Crashfix in error conditions

dovecot at dovecot.org dovecot at dovecot.org
Thu Nov 8 04:01:07 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/42acb5629519
changeset: 6731:42acb5629519
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 08 04:01:03 2007 +0200
description:
Crashfix in error conditions

diffstat:

1 file changed, 3 insertions(+)
src/lib-index/mail-cache-transaction.c |    3 +++

diffs (13 lines):

diff -r 5f30b309a79e -r 42acb5629519 src/lib-index/mail-cache-transaction.c
--- a/src/lib-index/mail-cache-transaction.c	Thu Nov 08 03:43:26 2007 +0200
+++ b/src/lib-index/mail-cache-transaction.c	Thu Nov 08 04:01:03 2007 +0200
@@ -760,6 +760,9 @@ static int mail_cache_header_add_field(s
 		cache->fields[i].used = TRUE;
 
 	if ((ret = mail_cache_transaction_lock(ctx)) <= 0) {
+		if (MAIL_CACHE_IS_UNUSABLE(cache))
+			return -1;
+
 		/* if we compressed the cache, the field should be there now.
 		   it's however possible that someone else just compressed it
 		   and we only reopened the cache file. */


More information about the dovecot-cvs mailing list