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:
parent
559696f763
commit
0e28c86f54
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user