From: Timo Sirainen Date: Thu, 4 Aug 2011 16:29:25 +0000 (+0300) Subject: pop3: Fixed RETR/TOP commands. X-Git-Tag: 2.1.alpha1~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1925b60ed6ac5b86b2b95db7f25c8d2a10c923ae;p=thirdparty%2Fdovecot%2Fcore.git pop3: Fixed RETR/TOP commands. --- diff --git a/src/pop3/pop3-commands.c b/src/pop3/pop3-commands.c index ae5240a61d..865026a98c 100644 --- a/src/pop3/pop3-commands.c +++ b/src/pop3/pop3-commands.c @@ -307,6 +307,7 @@ struct fetch_context { static void fetch_deinit(struct fetch_context *ctx) { + mail_free(&ctx->mail); i_free(ctx); } @@ -429,6 +430,9 @@ static int fetch(struct client *client, unsigned int msgnum, uoff_t body_lines, ctx = i_new(struct fetch_context, 1); ctx->byte_counter = byte_counter; ctx->byte_counter_offset = client->output->offset; + ctx->mail = mail_alloc(client->trans, + MAIL_FETCH_STREAM_HEADER | + MAIL_FETCH_STREAM_BODY, NULL); mail_set_seq(ctx->mail, msgnum_to_seq(client, msgnum)); if (mail_get_stream(ctx->mail, NULL, NULL, &ctx->stream) < 0) {