Skip to content

Commit

Permalink
auth: Make static analyzer happier.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sirainen committed Nov 2, 2016
1 parent b8673ed commit fb9b991
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/auth/passdb-static.c
Expand Up @@ -19,6 +19,9 @@ static_save_fields(struct auth_request *request, const char **password_r,
(struct static_passdb_module *)request->passdb->passdb;
const char *error;

*password_r = NULL;
*scheme_r = NULL;

auth_request_log_debug(request, AUTH_SUBSYS_DB, "lookup");
if (passdb_template_export(module->tmpl, request, &error) < 0) {
auth_request_log_error(request, AUTH_SUBSYS_DB,
Expand All @@ -39,8 +42,6 @@ static_save_fields(struct auth_request *request, const char **password_r,
} 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;
}

Expand Down

0 comments on commit fb9b991

Please sign in to comment.