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

@ -128,7 +128,7 @@ void sgr_free (/*@out@*/ /*@only@*/struct sgrp *sgent)
size_t i;
free (sgent->sg_name);
if (NULL != sgent->sg_passwd) {
memzero (sgent->sg_passwd, strlen (sgent->sg_passwd));
strzero (sgent->sg_passwd);
free (sgent->sg_passwd);
}
for (i = 0; NULL != sgent->sg_adm[i]; i++) {