]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fixed mbox/cydir crashing on cache parsing deinit.
authorTimo Sirainen <tss@iki.fi>
Fri, 6 Aug 2010 14:11:06 +0000 (15:11 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 6 Aug 2010 14:11:06 +0000 (15:11 +0100)
src/lib-storage/index/index-mail.c

index c08392b53605dfb49aa1cb86823da4e26a43b421..0caaa4238940a8cb4228038a46e1622bbe4b1b1d 100644 (file)
@@ -1405,6 +1405,11 @@ void index_mail_cache_parse_deinit(struct mail *_mail, time_t received_date,
                   don't bother trying to update cache file */
                mail->data.no_caching = TRUE;
                mail->data.forced_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. */