dovecot-1.2: lib-storage: Fixed mbox/cydir crashing on failed ca...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 14 18:31:37 EEST 2010


details:   http://hg.dovecot.org/dovecot-1.2/rev/1b40e217e020
changeset: 9621:1b40e217e020
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 14 16:31:34 2010 +0100
description:
lib-storage: Fixed mbox/cydir crashing on failed cache parsing deinit.

diffstat:

 src/lib-storage/index/index-mail.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 0149beb01eec -r 1b40e217e020 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c	Fri Oct 01 22:10:05 2010 +0100
+++ b/src/lib-storage/index/index-mail.c	Thu Oct 14 16:31:34 2010 +0100
@@ -1402,6 +1402,11 @@
 		/* we're going to delete this mail anyway,
 		   don't bother trying to update cache file */
 		mail->data.no_caching = TRUE;
+
+		if (mail->data.parser_ctx == NULL) {
+			/* we didn't even start cache parsing */
+			return;
+		}
 	}
 
 	/* This is needed with 0 byte mails to get hdr=NULL call done. */


More information about the dovecot-cvs mailing list