summaryrefslogtreecommitdiff
path: root/src/tty-ask-password-agent
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-10-15 10:02:35 -0400
committerLennart Poettering <lennart@poettering.net>2015-10-19 23:13:07 +0200
commitab84f5b95e10e8ffa115696ddf29c48440c5bae4 (patch)
treea156b9b64ef953463e97d3722e70f638a2efff0e /src/tty-ask-password-agent
parent1602b008531ba6e0c704588cb2643daef26b71d9 (diff)
strv: Add _cleanup_strv_free_erase_ and _cleanup_string_free_erase_
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 7a5ac9fa9c..8423364046 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -307,7 +307,7 @@ static int parse_password(const char *filename, char **wall) {
}
if (arg_plymouth) {
- _cleanup_strv_free_ char **passwords = NULL;
+ _cleanup_strv_free_erase_ char **passwords = NULL;
r = ask_password_plymouth(message, not_after, accept_cached ? ASK_PASSWORD_ACCEPT_CACHED : 0, filename, &passwords);
if (r >= 0) {
@@ -330,10 +330,8 @@ static int parse_password(const char *filename, char **wall) {
}
}
- strv_erase(passwords);
-
} else {
- _cleanup_free_ char *password = NULL;
+ _cleanup_string_free_erase_ char *password = NULL;
int tty_fd = -1;
if (arg_console) {
@@ -363,8 +361,6 @@ static int parse_password(const char *filename, char **wall) {
strcpy(packet + 1, password);
}
}
-
- string_erase(password);
}
if (IN_SET(r, -ETIME, -ENOENT)) {