summaryrefslogtreecommitdiff
path: root/src/shared/ask-password-api.c
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/shared/ask-password-api.c
parent1602b008531ba6e0c704588cb2643daef26b71d9 (diff)
strv: Add _cleanup_strv_free_erase_ and _cleanup_string_free_erase_
Diffstat (limited to 'src/shared/ask-password-api.c')
-rw-r--r--src/shared/ask-password-api.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index e35594a5df..ddf42f11e1 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -94,7 +94,7 @@ static int retrieve_key(key_serial_t serial, char ***ret) {
}
static int add_to_keyring(const char *keyname, AskPasswordFlags flags, char **passwords) {
- _cleanup_strv_free_ char **l = NULL;
+ _cleanup_strv_free_erase_ char **l = NULL;
_cleanup_free_ char *p = NULL;
key_serial_t serial;
size_t n;
@@ -119,7 +119,6 @@ static int add_to_keyring(const char *keyname, AskPasswordFlags flags, char **pa
return r;
r = strv_make_nulstr(l, &p, &n);
- strv_erase(l);
if (r < 0)
return r;