]> 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)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 28 Feb 2022 13:26:42 +0000 (13:26 +0000)
src/lib-storage/index/index-storage.c

index cd6909301726fa5c4779eda440a1b081b263ad66..c01bf60516584e2109c5611a50a2297e9d54decb 100644 (file)
@@ -954,6 +954,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);