From: Timo Sirainen Date: Wed, 6 Oct 2010 17:57:16 +0000 (+0100) Subject: lib-lda: Fixed error handling if newly delivered mail couldn't be opened. X-Git-Tag: 2.0.6~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ec9828a70473b7a57eceb1b8a7c60552b3915c;p=thirdparty%2Fdovecot%2Fcore.git lib-lda: Fixed error handling if newly delivered mail couldn't be opened. Found by Vadim Okun. --- diff --git a/src/lib-lda/mail-deliver.c b/src/lib-lda/mail-deliver.c index 55b8f54ff3..0fb91da728 100644 --- a/src/lib-lda/mail-deliver.c +++ b/src/lib-lda/mail-deliver.c @@ -229,7 +229,7 @@ int mail_deliver_save(struct mail_deliver_context *ctx, const char *mailbox, t = mailbox_transaction_begin(box, 0); ctx->dest_mail = mail_alloc(t, MAIL_FETCH_STREAM_BODY, NULL); - if (mail_set_uid(ctx->dest_mail, range[0].seq1) < 0) { + if (!mail_set_uid(ctx->dest_mail, range[0].seq1)) { mail_free(&ctx->dest_mail); mailbox_transaction_rollback(&t); }