]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: index_save_context_free() - Add assertion on non-NULL ctx->dest_mail
authorMarkus Valentin <markus.valentin@open-xchange.com>
Wed, 12 Jan 2022 14:09:16 +0000 (15:09 +0100)
committerMarkus Valentin <markus.valentin@open-xchange.com>
Mon, 14 Mar 2022 13:06:49 +0000 (14:06 +0100)
src/lib-storage/index/index-storage.c

index 543620594f271de6c7ef91e9b1ca7c3e766938f7..e1998b0bd6d193f68e3566ba1aafc7d54d31cf82 100644 (file)
@@ -955,6 +955,8 @@ bool index_storage_is_inconsistent(struct mailbox *box)
 
 void index_save_context_free(struct mail_save_context *ctx)
 {
+       i_assert(ctx->dest_mail != NULL);
+
        index_mail_save_finish(ctx);
        if (ctx->data.keywords != NULL)
                mailbox_keywords_unref(&ctx->data.keywords);