From: Timo Sirainen Date: Fri, 21 May 2021 11:42:07 +0000 (+0300) Subject: imap: copy/move: Fix memory leak when no messages were found X-Git-Tag: 2.3.15~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=708ab90229c302413f4039e032d7c8d059407594;p=thirdparty%2Fdovecot%2Fcore.git imap: copy/move: Fix memory leak when no messages were found --- diff --git a/src/imap/cmd-copy.c b/src/imap/cmd-copy.c index 85981bef3f..0a65c13407 100644 --- a/src/imap/cmd-copy.c +++ b/src/imap/cmd-copy.c @@ -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."); }