diff --git a/src/core/cgroup.c b/src/core/cgroup.c index e604c3cbc..b19e442df 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -781,8 +781,10 @@ void unit_destroy_cgroup(Unit *u) { return; r = cg_trim_everywhere(u->manager->cgroup_supported, u->cgroup_path, !unit_has_name(u, SPECIAL_ROOT_SLICE)); - if (r < 0) + if (r < 0) { log_debug("Failed to destroy cgroup %s: %s", u->cgroup_path, strerror(-r)); + return; + } hashmap_remove(u->manager->cgroup_unit, u->cgroup_path);