dovecot-2.2: imapc: Fixed crash if imapc_host or imapc_password ...

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 27 18:51:03 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/a887dc2b3fb9
changeset: 19227:a887dc2b3fb9
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 27 21:30:56 2015 +0300
description:
imapc: Fixed crash if imapc_host or imapc_password setting was missing.
Instead of giving a nice error message about it.
Found by Coverity.

diffstat:

 src/lib-storage/index/imapc/imapc-list.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r e5164f14723f -r a887dc2b3fb9 src/lib-storage/index/imapc/imapc-list.c
--- a/src/lib-storage/index/imapc/imapc-list.c	Sun Sep 27 21:28:25 2015 +0300
+++ b/src/lib-storage/index/imapc/imapc-list.c	Sun Sep 27 21:30:56 2015 +0300
@@ -87,11 +87,10 @@
 {
 	struct imapc_mailbox_list *list = (struct imapc_mailbox_list *)_list;
 
-	list->client->destroying = TRUE;
-
 	/* make sure all pending commands are aborted before anything is
 	   deinitialized */
 	if (list->client != NULL) {
+		list->client->destroying = TRUE;
 		imapc_client_disconnect(list->client->client);
 		imapc_storage_client_unref(&list->client);
 	}


More information about the dovecot-cvs mailing list