From: Timo Sirainen Date: Wed, 2 Nov 2016 21:00:50 +0000 (+0200) Subject: auth: Make static analyzer happier. X-Git-Tag: 2.2.27~212 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36447e7ead047ae6a6a2b6794b534bf5fd8f3914;p=thirdparty%2Fdovecot%2Fcore.git auth: Make static analyzer happier. Don't complain about uninitialized static_password being sent to passdb_handle_credentials(). It could only happen for failures, and passdb_handle_credentials() wouldn't have used the password then. --- diff --git a/src/auth/passdb-static.c b/src/auth/passdb-static.c index 631b967c89..440d70899c 100644 --- a/src/auth/passdb-static.c +++ b/src/auth/passdb-static.c @@ -17,6 +17,9 @@ static_save_fields(struct auth_request *request, const char **password_r, const struct static_passdb_module *module = (struct static_passdb_module *)request->passdb->passdb; + *password_r = NULL; + *scheme_r = NULL; + auth_request_log_debug(request, AUTH_SUBSYS_DB, "lookup"); passdb_template_export(module->tmpl, request); @@ -28,8 +31,6 @@ static_save_fields(struct auth_request *request, const char **password_r, const } else { auth_request_log_info(request, AUTH_SUBSYS_DB, "No password returned (and no nopassword)"); - *password_r = NULL; - *scheme_r = NULL; return PASSDB_RESULT_PASSWORD_MISMATCH; }