From: Timo Sirainen Date: Thu, 21 Feb 2013 17:58:39 +0000 (+0200) Subject: imap: Allocate LIST patterns from command pool so they don't get corrupted in long... X-Git-Tag: 2.2.rc1~1^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94cd1e3ed5391a091da5589db438d732eb9dbf0c;p=thirdparty%2Fdovecot%2Fcore.git imap: Allocate LIST patterns from command pool so they don't get corrupted in long runs. --- diff --git a/src/imap/cmd-list.c b/src/imap/cmd-list.c index c649cdae40..ab64aa6bf1 100644 --- a/src/imap/cmd-list.c +++ b/src/imap/cmd-list.c @@ -1026,7 +1026,7 @@ bool cmd_list_full(struct client_command_context *cmd, bool lsub) return TRUE; } if (imap_utf7_to_utf8(pattern, str) == 0) - pattern = t_strdup(str_c(str)); + pattern = p_strdup(cmd->pool, str_c(str)); array_append(&patterns, &pattern, 1); str_truncate(str, 0); } @@ -1037,7 +1037,7 @@ bool cmd_list_full(struct client_command_context *cmd, bool lsub) return TRUE; } if (imap_utf7_to_utf8(pattern, str) == 0) - pattern = str_c(str); + pattern = p_strdup(cmd->pool, str_c(str)); p_array_init(&patterns, cmd->pool, 1); array_append(&patterns, &pattern, 1);