From: Aki Tuomi Date: Thu, 29 Jun 2017 10:22:32 +0000 (+0300) Subject: lib-storage: Clarify keywords handling in mail_save_finish X-Git-Tag: 2.3.0.rc1~1300 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4b086930123c589b2e3d5a5fef36db38e73fa36;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Clarify keywords handling in mail_save_finish --- diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index a93c859317..1fd86a9bf6 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -2356,6 +2356,8 @@ int mailbox_save_finish(struct mail_save_context **_ctx) { struct mail_save_context *ctx = *_ctx; struct mailbox_transaction_context *t = ctx->transaction; + /* we need to keep a copy of this because save_finish implementations + will likely zero the data structure during cleanup */ struct mail_keywords *keywords = ctx->data.keywords; enum mail_flags pvt_flags = ctx->data.pvt_flags; bool copying_via_save = ctx->copying_via_save;