lib: use strzero where applicable

Replace `memzero (s, strlen(s))` with just the internal wrapper
`strzero (s)` where the underlying allocated size is not known.
This commit is contained in:
Christian Göttsche
2022-09-17 17:56:49 +02:00
committed by Iker Pedrosa
parent 14e7caf6b2
commit e74bfe2c75
4 changed files with 4 additions and 4 deletions

View File

@@ -73,7 +73,7 @@ void pw_free (/*@out@*/ /*@only@*/struct passwd *pwent)
if (pwent != NULL) {
free (pwent->pw_name);
if (pwent->pw_passwd) {
memzero (pwent->pw_passwd, strlen (pwent->pw_passwd));
strzero (pwent->pw_passwd);
free (pwent->pw_passwd);
}
free (pwent->pw_gecos);