mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
cgroup: Prevent theoretical nullptr deref in unit mask calculation
This commit is contained in:
parent
aa91d5925a
commit
c710d3b430
@ -1378,6 +1378,8 @@ static CGroupMask unit_get_cgroup_mask(Unit *u) {
|
|||||||
|
|
||||||
c = unit_get_cgroup_context(u);
|
c = unit_get_cgroup_context(u);
|
||||||
|
|
||||||
|
assert(c);
|
||||||
|
|
||||||
/* Figure out which controllers we need, based on the cgroup context object */
|
/* Figure out which controllers we need, based on the cgroup context object */
|
||||||
|
|
||||||
if (c->cpu_accounting)
|
if (c->cpu_accounting)
|
||||||
|
Loading…
Reference in New Issue
Block a user