From 2ca520b06a1a80497dd39c98533ae21c165752c2 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Wed, 1 Jul 2020 20:35:59 +0200 Subject: Some renaming for consistency and some quick FIXME fixes --- shared/utils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'shared/utils.c') diff --git a/shared/utils.c b/shared/utils.c index 13cacac..b870716 100644 --- a/shared/utils.c +++ b/shared/utils.c @@ -36,6 +36,16 @@ void enable_colors() ansi_normal = ANSI_NORMAL; } +void free_password(char **password) +{ + if (!password || !*password) + return; + + explicit_bzero(*password, strlen(*password)); + xfree(*password); + *password = NULL; +} + void socket_set_low_latency(int sfd, bool keepalive, bool iptos, bool nodelay) { int option; -- cgit v1.2.3