]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fixed crashes at deinit when -r rawlog parameter was used.
authorTimo Sirainen <tss@iki.fi>
Sat, 26 Oct 2013 15:31:16 +0000 (18:31 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 26 Oct 2013 15:31:16 +0000 (18:31 +0300)
src/doveadm/dsync/doveadm-dsync.c

index dab8bdd7692b71eda99be12e47eac3024523908e..05e861fb202af29f5433e0ce398c843ab005da58 100644 (file)
@@ -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);
 }