dovecot-2.2: dsync-server: Don't crash if connection didn't come...

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 25 17:08:01 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/c0deb3a9bb3d
changeset: 15938:c0deb3a9bb3d
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 25 17:07:55 2013 +0200
description:
dsync-server: Don't crash if connection didn't come from doveadm-server

diffstat:

 src/doveadm/dsync/doveadm-dsync.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r c20696d7ecb0 -r c0deb3a9bb3d src/doveadm/dsync/doveadm-dsync.c
--- a/src/doveadm/dsync/doveadm-dsync.c	Mon Feb 25 17:07:38 2013 +0200
+++ b/src/doveadm/dsync/doveadm-dsync.c	Mon Feb 25 17:07:55 2013 +0200
@@ -846,9 +846,11 @@
 		_ctx->exit_code = EX_TEMPFAIL;
 	dsync_ibc_deinit(&ibc);
 
-	/* make sure nothing more is written by the generic doveadm
-	   connection code */
-	o_stream_close(_ctx->conn->output);
+	if (_ctx->conn != NULL) {
+		/* make sure nothing more is written by the generic doveadm
+		   connection code */
+		o_stream_close(_ctx->conn->output);
+	}
 
 	return _ctx->exit_code == 0 ? 0 : -1;
 }


More information about the dovecot-cvs mailing list