From e2bdacc34dde56aa664059ab56e8b77e82bd1805 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 1 Jul 2010 16:30:53 +0100 Subject: [PATCH] mdbox: More error handling fixing. --HG-- branch : HEAD --- src/lib-storage/index/dbox-multi/mdbox-save.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib-storage/index/dbox-multi/mdbox-save.c b/src/lib-storage/index/dbox-multi/mdbox-save.c index 0eeea38d2a..93802c069b 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-save.c +++ b/src/lib-storage/index/dbox-multi/mdbox-save.c @@ -107,6 +107,9 @@ mdbox_save_alloc(struct mailbox_transaction_context *t) /* use the existing allocated structure */ ctx->ctx.failed = FALSE; ctx->ctx.finished = FALSE; + ctx->ctx.cur_file = NULL; + ctx->ctx.dbox_output = NULL; + ctx->cur_file_append = NULL; return &ctx->ctx.ctx; } @@ -141,8 +144,6 @@ int mdbox_save_begin(struct mail_save_context *_ctx, struct istream *input) if (mdbox_map_append_next(ctx->append_ctx, mail_size, 0, &ctx->cur_file_append, &ctx->ctx.dbox_output) < 0) { - ctx->cur_file_append = NULL; - ctx->ctx.dbox_output = NULL; ctx->ctx.failed = TRUE; return -1; } -- 2.47.3