mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
systemctl: fix bad memory access when mangle_names() fails (#5485)
Fixes #5483
This commit is contained in:
parent
f4ad4d658d
commit
523f8cde4c
@ -5964,6 +5964,7 @@ static int mangle_names(char **original_names, char ***mangled_names) {
|
||||
} else {
|
||||
r = unit_name_mangle(*name, UNIT_NAME_NOGLOB, i);
|
||||
if (r < 0) {
|
||||
*i = NULL;
|
||||
strv_free(l);
|
||||
return log_error_errno(r, "Failed to mangle unit name: %m");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user