summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 1194c524bf..d26f6e456c 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2090,7 +2090,7 @@ static int unit_add_one_default_cgroup(Unit *u, const char *controller) {
return -ENOMEM;
b->controller = strdup(controller);
- if (!b)
+ if (!b->controller)
goto fail;
b->path = unit_default_cgroup_path(u);