dovecot: ref/unref stream when parsing it.

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 18 09:36:27 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/d62bddb414ef
changeset: 6082:d62bddb414ef
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 18 09:36:04 2007 +0300
description:
ref/unref stream when parsing it.

diffstat:

1 file changed, 2 insertions(+)
src/lib-mail/message-parser.c |    2 ++

diffs (19 lines):

diff -r c23d396f84b2 -r d62bddb414ef src/lib-mail/message-parser.c
--- a/src/lib-mail/message-parser.c	Wed Jul 18 09:26:35 2007 +0300
+++ b/src/lib-mail/message-parser.c	Wed Jul 18 09:36:04 2007 +0300
@@ -679,6 +679,7 @@ message_parser_init(pool_t part_pool, st
 	ctx->parts = ctx->part = part_pool == NULL ? NULL :
 		p_new(part_pool, struct message_part, 1);
 	ctx->parse_next_block = parse_next_header_init;
+	i_stream_ref(input);
 	return ctx;
 }
 
@@ -702,6 +703,7 @@ struct message_part *message_parser_dein
 	struct message_part *parts = ctx->parts;
 
 	*_ctx = NULL;
+	i_stream_unref(&ctx->input);
 	pool_unref(ctx->parser_pool);
 	return parts;
 }


More information about the dovecot-cvs mailing list