From: Timo Sirainen Date: Sat, 26 Oct 2013 15:31:16 +0000 (+0300) Subject: dsync: Fixed crashes at deinit when -r rawlog parameter was used. X-Git-Tag: 2.2.7~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75f28ef07dd77910878df7a9e11a1e2b094c14b4;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fixed crashes at deinit when -r rawlog parameter was used. --- diff --git a/src/doveadm/dsync/doveadm-dsync.c b/src/doveadm/dsync/doveadm-dsync.c index dab8bdd769..05e861fb20 100644 --- a/src/doveadm/dsync/doveadm-dsync.c +++ b/src/doveadm/dsync/doveadm-dsync.c @@ -455,12 +455,12 @@ cmd_dsync_icb_stream_init(struct dsync_cmd_context *ctx, ctx->input = i_stream_create_fd(ctx->fd_in, (size_t)-1, FALSE); ctx->output = o_stream_create_fd(ctx->fd_out, (size_t)-1, FALSE); } - i_stream_ref(ctx->input); - o_stream_ref(ctx->output); if (ctx->rawlog_path != NULL) { iostream_rawlog_create_path(ctx->rawlog_path, &ctx->input, &ctx->output); } + i_stream_ref(ctx->input); + o_stream_ref(ctx->output); return dsync_ibc_init_stream(ctx->input, ctx->output, name, temp_prefix); }