mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
cgroup-util: refuse the case that both path and suffix are empty strings
Fixes CID#1322378.
This commit is contained in:
committed by
Luca Boccassi
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))
|
||||
|
||||
Reference in New Issue
Block a user