]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Don't crash with "doveadm auth cache flush" when cache is disabled.
authorTimo Sirainen <tss@iki.fi>
Wed, 23 Oct 2013 08:40:26 +0000 (11:40 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 23 Oct 2013 08:40:26 +0000 (11:40 +0300)
src/auth/auth-master-connection.c

index 69bdbde3c35c2207691ac48b5ea3c3a6287e9c65..4ccf0935f2242b7835c959c6fe1e1e96a702fef5 100644 (file)
@@ -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 {