]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Fixed error handling if newly delivered mail couldn't be opened.
authorTimo Sirainen <tss@iki.fi>
Wed, 6 Oct 2010 17:57:16 +0000 (18:57 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 6 Oct 2010 17:57:16 +0000 (18:57 +0100)
Found by Vadim Okun.

src/lib-lda/mail-deliver.c

index 55b8f54ff37e1ed88c7d8bc9d68342a6791d4194..0fb91da728ed330e85d119eac6ce5c6d1cb5daaa 100644 (file)
@@ -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);
                        }