]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: copy/move: Fix memory leak when no messages were found
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 21 May 2021 11:42:07 +0000 (14:42 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 21 May 2021 11:42:07 +0000 (14:42 +0300)
src/imap/cmd-copy.c

index 85981bef3ff4f4b81bac7d62b775e4154c04934d..0a65c134073f7d3a874d58ffd45ae3ba147be7ea 100644 (file)
@@ -244,6 +244,7 @@ static bool cmd_copy_full(struct client_command_context *cmd, bool move)
                return ret < 0;
        if (search_args->args->type == SEARCH_ALL) {
                i_assert(search_args->args->match_not);
+               mail_search_args_unref(&search_args);
                return cmd_sync(cmd, sync_flags, imap_flags,
                                "OK No messages found.");
        }