1
0
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:
Yu Watanabe 2022-02-12 15:32:48 +09:00 committed by Luca Boccassi
parent ac3979abd7
commit 74c60fcbec

View File

@ -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))