changeset 9621:1b40e217e020 HEAD

lib-storage: Fixed mbox/cydir crashing on failed cache parsing deinit.
author Timo Sirainen <tss@iki.fi>
date Thu, 14 Oct 2010 16:31:34 +0100
parents 0149beb01eec
children 1ecf1c3f7ecf
files src/lib-storage/index/index-mail.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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. */