Mercurial > dovecot > core-2.2
changeset 18987:9f815e781beb
imap: Fixed memory leak in SELECT QRESYNC error handling path.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 20 Aug 2015 16:04:48 +0300 |
parents | 118594ed7d46 |
children | 984ce015e9d0 |
files | src/imap/cmd-select.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-select.c Wed Aug 19 21:41:55 2015 +0300 +++ b/src/imap/cmd-select.c Thu Aug 20 16:04:48 2015 +0300 @@ -238,6 +238,7 @@ struct imap_fetch_context *fetch_ctx; struct mail_search_args *search_args; struct imap_fetch_qresync_args qresync_args; + int ret; search_args = mail_search_build_init(); search_args->args = p_new(search_args->pool, struct mail_search_arg, 1); @@ -273,10 +274,9 @@ ctx->cmd->context = ctx; return 0; } - if (imap_fetch_end(fetch_ctx) < 0) - return -1; + ret = imap_fetch_end(fetch_ctx); imap_fetch_free(&fetch_ctx); - return 1; + return ret < 0 ? -1 : 1; } static int