From: Timo Sirainen Date: Mon, 27 Nov 2017 16:34:49 +0000 (+0200) Subject: doveadm-server: Fix potential dsync-server panic at deinit X-Git-Tag: 2.3.0.rc1~321 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c1077b110ef7cfb5fe3bd2aa32b0ebd90dac02e;p=thirdparty%2Fdovecot%2Fcore.git doveadm-server: Fix potential dsync-server panic at deinit If the ostream is still used (e.g. for logging) after dsync is finished, it crashed with: Panic: file ostream.c: line 276 (o_stream_sendv_int): assertion failed: (!_stream->finished) --- diff --git a/src/doveadm/doveadm-dsync.c b/src/doveadm/doveadm-dsync.c index 19c5f0b0ed..f5e437a3dc 100644 --- a/src/doveadm/doveadm-dsync.c +++ b/src/doveadm/doveadm-dsync.c @@ -1159,6 +1159,7 @@ cmd_dsync_server_run(struct doveadm_mail_cmd_context *_ctx, ctx->fd_in = ctx->fd_out = -1; ctx->input = cctx->input; ctx->output = cctx->output; + o_stream_set_finish_also_parent(ctx->output, FALSE); o_stream_nsend(ctx->output, "\n+\n", 3); i_set_failure_prefix("dsync-server(%s): ", user->username); name = i_stream_get_name(ctx->input);