1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

cgroup: Prevent theoretical nullptr deref in unit mask calculation

This commit is contained in:
Chris Down 2019-06-07 06:28:10 +01:00
parent aa91d5925a
commit c710d3b430

View File

@ -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)