dovecot-2.2: lib-dict: Fixed crash when transaction failed due t...

dovecot at dovecot.org dovecot at dovecot.org
Fri Mar 20 19:14:18 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/d8f24038d3cb
changeset: 18379:d8f24038d3cb
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Mar 20 21:13:21 2015 +0200
description:
lib-dict: Fixed crash when transaction failed due to dict server disconnection.

diffstat:

 src/lib-dict/dict-client.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r ebc2672a30f6 -r d8f24038d3cb src/lib-dict/dict-client.c
--- a/src/lib-dict/dict-client.c	Fri Mar 20 21:01:08 2015 +0200
+++ b/src/lib-dict/dict-client.c	Fri Mar 20 21:13:21 2015 +0200
@@ -270,8 +270,10 @@
 	/* the callback may call the dict code again, so remove this
 	   transaction before calling it */
 	i_assert(dict->async_commits > 0);
-	if (--dict->async_commits == 0)
-		io_remove(&dict->io);
+	if (--dict->async_commits == 0) {
+		if (dict->io != NULL)
+			io_remove(&dict->io);
+	}
 	DLLIST_REMOVE(&dict->transactions, ctx);
 
 	if (ctx->callback != NULL)


More information about the dovecot-cvs mailing list