Use freezero(3) where suitable
It originated in OpenBSD, and is available in libbsd. Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Iker Pedrosa
parent
8e0ad48c21
commit
1482224c54
@@ -136,8 +136,7 @@ agetpass(const char *prompt)
|
||||
return pass;
|
||||
|
||||
fail:
|
||||
memzero(pass, PASS_MAX);
|
||||
free(pass);
|
||||
freezero(pass, PASS_MAX);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -145,8 +144,5 @@ fail:
|
||||
void
|
||||
erase_pass(char *pass)
|
||||
{
|
||||
if (pass == NULL)
|
||||
return;
|
||||
memzero(pass, PASS_MAX);
|
||||
free(pass);
|
||||
freezero(pass, PASS_MAX);
|
||||
}
|
||||
|
Reference in New Issue
Block a user