From: Timo Sirainen Date: Wed, 23 Oct 2013 08:40:26 +0000 (+0300) Subject: auth: Don't crash with "doveadm auth cache flush" when cache is disabled. X-Git-Tag: 2.2.7~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f205e138634bd4269fa095463938cccf3970954d;p=thirdparty%2Fdovecot%2Fcore.git auth: Don't crash with "doveadm auth cache flush" when cache is disabled. --- diff --git a/src/auth/auth-master-connection.c b/src/auth/auth-master-connection.c index 69bdbde3c3..4ccf0935f2 100644 --- a/src/auth/auth-master-connection.c +++ b/src/auth/auth-master-connection.c @@ -147,7 +147,10 @@ master_input_cache_flush(struct auth_master_connection *conn, const char *args) return FALSE; } - if (list[1] == NULL) { + if (passdb_cache == NULL) { + /* cache disabled */ + count = 0; + } if (list[1] == NULL) { /* flush the whole cache */ count = auth_cache_clear(passdb_cache); } else {