Avoid a clang analyzer false positive.

This commit is contained in:
Todd C. Miller
2017-05-12 10:02:18 -06:00
parent 1dc39e9d99
commit 7db97c7835
2 changed files with 6 additions and 1 deletions

View File

@@ -295,7 +295,7 @@ verify_user(struct passwd *pw, char *prompt, int validated,
if (success != AUTH_FAILURE)
break;
}
if (!standalone) {
if (pass != NULL) {
memset_s(pass, SUDO_CONV_REPL_MAX, 0, strlen(pass));
free(pass);
}