dovecot-2.2: imap: Fixed memory leak in SELECT QRESYNC error han...

dovecot at dovecot.org dovecot at dovecot.org
Thu Aug 20 13:05:39 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/9f815e781beb
changeset: 18987:9f815e781beb
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Aug 20 16:04:48 2015 +0300
description:
imap: Fixed memory leak in SELECT QRESYNC error handling path.

diffstat:

 src/imap/cmd-select.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r 118594ed7d46 -r 9f815e781beb src/imap/cmd-select.c
--- 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


More information about the dovecot-cvs mailing list