mirror of
https://github.com/systemd/systemd.git
synced 2025-01-27 18:04:05 +03:00
cgroup: fix potential bad memory access
This commit is contained in:
parent
9a66c87a23
commit
989189eabf
@ -518,9 +518,9 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
|
||||
if (!path && !suffix)
|
||||
return -EINVAL;
|
||||
|
||||
if (isempty(suffix))
|
||||
if (!suffix)
|
||||
t = strdup(path);
|
||||
else if (isempty(path))
|
||||
else if (!path)
|
||||
t = strdup(suffix);
|
||||
else
|
||||
t = strjoin(path, "/", suffix, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user