This tries to query unit name in cgroup_unit hashmap, which
always returns NULL. Just return NULL directly instead.
e = strrchr(p, '/');
if (!e || e == p)
- return hashmap_get(m->cgroup_unit, SPECIAL_ROOT_SLICE);
+ return NULL; /* reached cgroup root? return NULL and possibly fall back to manager_get_unit_by_pidref_watching() */
*e = 0;
}
}
-Unit *manager_get_unit_by_pidref_cgroup(Manager *m, const PidRef *pid) {
+Unit* manager_get_unit_by_pidref_cgroup(Manager *m, const PidRef *pid) {
_cleanup_free_ char *cgroup = NULL;
assert(m);