]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mdbox: Fix crash if fdatasync_path() fails
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 20 Jun 2023 15:21:38 +0000 (18:21 +0300)
committerDovecot Automation <automation@dovecot.org>
Wed, 21 Jun 2023 12:12:18 +0000 (12:12 +0000)
There is no dest_mail anymore at this stage of transaction.

src/lib-storage/index/dbox-multi/mdbox-save.c

index c0dcf5b480757e98979298b00a23dec4eccf7751..beefc07bb790e63f5256c252c1ba4d42f8facb6e 100644 (file)
@@ -401,7 +401,7 @@ void mdbox_transaction_save_commit_post(struct mail_save_context *_ctx,
                const char *box_path = mailbox_get_path(&ctx->mbox->box);
 
                if (fdatasync_path(box_path) < 0) {
-                       mail_set_critical(_ctx->dest_mail,
+                       mailbox_set_critical(_ctx->transaction->box,
                                "fdatasync_path(%s) failed: %m", box_path);
                }
        }