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

@@ -59,7 +59,7 @@ void spw_free (/*@out@*/ /*@only@*/struct spwd *spent)
if (spent != NULL) {
free (spent->sp_namp);
if (NULL != spent->sp_pwdp) {
memzero (spent->sp_pwdp, strlen (spent->sp_pwdp));
strzero (spent->sp_pwdp);
free (spent->sp_pwdp);
}
free (spent);