dovecot: If we couldn't add a new header field, don't crash.

dovecot at dovecot.org dovecot at dovecot.org
Thu Jul 12 04:56:21 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/33908f232e9a
changeset: 5960:33908f232e9a
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jul 12 04:56:02 2007 +0300
description:
If we couldn't add a new header field, don't crash.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-index/mail-cache-transaction.c |    2 +-

diffs (12 lines):

diff -r 5513182aed67 -r 33908f232e9a src/lib-index/mail-cache-transaction.c
--- a/src/lib-index/mail-cache-transaction.c	Thu Jul 12 04:55:20 2007 +0300
+++ b/src/lib-index/mail-cache-transaction.c	Thu Jul 12 04:56:02 2007 +0300
@@ -681,7 +681,7 @@ static int mail_cache_header_add_field(s
 		if (mail_cache_compress(cache, ctx->trans) < 0)
 			return -1;
 		if ((ret = mail_cache_transaction_lock(ctx)) <= 0)
-			return ret;
+			return -1;
 	}
 
 	/* re-read header to make sure we don't lose any fields. */


More information about the dovecot-cvs mailing list