diff options
-rw-r--r-- | src/basic/cgroup-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index bf897c9b2d..77375f3669 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -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); |