1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

ask-password: fix minor memory leak on error path

CID 1396557
This commit is contained in:
Lennart Poettering 2018-11-06 12:34:01 +01:00
parent 559696f763
commit 0e28c86f54

View File

@ -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);