diff options
Diffstat (limited to 'shared/utils.c')
-rw-r--r-- | shared/utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |