dovecot-2.2: imap: URLFETCH leaked istream on failures.

dovecot at dovecot.org dovecot at dovecot.org
Mon May 6 20:21:38 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/bed8c39349fa
changeset: 16340:bed8c39349fa
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 06 20:20:43 2013 +0300
description:
imap: URLFETCH leaked istream on failures.

diffstat:

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

diffs (21 lines):

diff -r 01560ee1a4b8 -r bed8c39349fa src/imap/cmd-urlfetch.c
--- a/src/imap/cmd-urlfetch.c	Mon May 06 20:15:58 2013 +0300
+++ b/src/imap/cmd-urlfetch.c	Mon May 06 20:20:43 2013 +0300
@@ -39,6 +39,8 @@
 		return;
 	ctx->finished = TRUE;
 
+	if (ctx->input != NULL)
+		i_stream_unref(&ctx->input);
 	if (ctx->ufetch != NULL)
 		imap_urlauth_fetch_deinit(&ctx->ufetch);
 
@@ -225,7 +227,7 @@
 	if (reply->input != NULL) {
 		ctx->input = reply->input;
 		ctx->size = reply->size;
-		i_stream_ref(reply->input);
+		i_stream_ref(ctx->input);
 
 		ret = cmd_urlfetch_transfer_literal(cmd);
 		if (ret < 0) {


More information about the dovecot-cvs mailing list