diff options
Diffstat (limited to 'src/shared/ask-password-api.c')
-rw-r--r-- | src/shared/ask-password-api.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index df5ede77b9..0240f785c7 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -460,11 +460,9 @@ int ask_password_tty( goto finish; } - l = strv_new(x, NULL); - if (!l) { - r = -ENOMEM; + r = strv_consume(&l, x); + if (r < 0) goto finish; - } if (keyname) (void) add_to_keyring_and_log(keyname, flags, l); |