From 850eed4e7eea8f166c590d75349008578e224d62 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 13 Jun 2018 20:06:11 +0300 Subject: [PATCH] dsync: ibc - reference iostreams internally This makes it clearer who needs to reference and unreference the streams. --- src/doveadm/doveadm-dsync.c | 2 -- src/doveadm/dsync/dsync-ibc-stream.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doveadm/doveadm-dsync.c b/src/doveadm/doveadm-dsync.c index dbafc5d817..194b3977ac 100644 --- a/src/doveadm/doveadm-dsync.c +++ b/src/doveadm/doveadm-dsync.c @@ -521,8 +521,6 @@ cmd_dsync_ibc_stream_init(struct dsync_cmd_context *ctx, 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, ctx->io_timeout_secs); } diff --git a/src/doveadm/dsync/dsync-ibc-stream.c b/src/doveadm/dsync/dsync-ibc-stream.c index 129f9d8740..1bb7d30f7f 100644 --- a/src/doveadm/dsync/dsync-ibc-stream.c +++ b/src/doveadm/dsync/dsync-ibc-stream.c @@ -2110,6 +2110,8 @@ dsync_ibc_init_stream(struct istream *input, struct ostream *output, ibc->ibc.v = dsync_ibc_stream_vfuncs; ibc->input = input; ibc->output = output; + i_stream_ref(ibc->input); + o_stream_ref(ibc->output); ibc->name = i_strdup(name); ibc->temp_path_prefix = i_strdup(temp_path_prefix); ibc->timeout_secs = timeout_secs; -- 2.47.3