mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
cgroup-util: refuse the case that both path and suffix are empty strings
Fixes CID#1322378.
This commit is contained in:
parent
ac3979abd7
commit
74c60fcbec
@ -533,7 +533,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
|
||||
/* If no controller is specified, we return the path *below* the controllers, without any
|
||||
* prefix. */
|
||||
|
||||
if (!path && !suffix)
|
||||
if (isempty(path) && isempty(suffix))
|
||||
return -EINVAL;
|
||||
|
||||
if (isempty(suffix))
|
||||
|
Loading…
x
Reference in New Issue
Block a user