]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix memory leak when using STORE with keywords on an EXAMINEd mailbox
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 23 Oct 2025 20:18:17 +0000 (23:18 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Oct 2025 07:22:50 +0000 (07:22 +0000)
src/imap/cmd-store.c

index ab246120823fa58e30f8a89c74bfd299f78e8608..8edf080d05d9a94604452d823fb9818f76d891f0 100644 (file)
@@ -160,6 +160,8 @@ bool cmd_store(struct client_command_context *cmd)
 
        if (client->mailbox_examined) {
                mail_search_args_unref(&search_args);
+               if (ctx.keywords != NULL)
+                       mailbox_keywords_unref(&ctx.keywords);
                if (ctx.max_modseq < (uint64_t)-1)
                        reply = "NO CONDSTORE failed: Mailbox is read-only.";
                else