dovecot-2.0: dbox: Crashfix when mail_attachment_dir wasn't enab...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 2 14:33:56 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/c883579dde58
changeset: 12243:c883579dde58
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 13 16:32:09 2010 +0100
description:
dbox: Crashfix when mail_attachment_dir wasn't enabled.

diffstat:

 src/lib-storage/index/dbox-common/dbox-save.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 658147ba327f -r c883579dde58 src/lib-storage/index/dbox-common/dbox-save.c
--- a/src/lib-storage/index/dbox-common/dbox-save.c	Thu Aug 12 18:17:23 2010 +0100
+++ b/src/lib-storage/index/dbox-common/dbox-save.c	Fri Aug 13 16:32:09 2010 +0100
@@ -102,8 +102,10 @@
 {
 	struct ostream *dbox_output = ctx->dbox_output;
 
-	if (index_attachment_save_finish(&ctx->ctx) < 0)
-		ctx->failed = TRUE;
+	if (ctx->ctx.attach != NULL) {
+		if (index_attachment_save_finish(&ctx->ctx) < 0)
+			ctx->failed = TRUE;
+	}
 	if (ctx->ctx.output == dbox_output)
 		return;
 


More information about the dovecot-cvs mailing list