diff options
author | Chris Down <chris@chrisdown.name> | 2019-06-07 07:28:10 +0200 |
---|---|---|
committer | Chris Down <chris@chrisdown.name> | 2019-06-07 07:33:53 +0200 |
commit | c710d3b4301cffafcd1bded7519176703d3e65c0 (patch) | |
tree | afdcf57dbe3a5bc7a1e9a403a74fd2d844e05735 /src/core | |
parent | systemctl: Prevent state_missing from being used uninit (diff) | |
download | systemd-c710d3b4301cffafcd1bded7519176703d3e65c0.tar.xz systemd-c710d3b4301cffafcd1bded7519176703d3e65c0.zip |
cgroup: Prevent theoretical nullptr deref in unit mask calculation
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/cgroup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index a7263855dc..0c885d5744 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -1378,6 +1378,8 @@ static CGroupMask unit_get_cgroup_mask(Unit *u) { c = unit_get_cgroup_context(u); + assert(c); + /* Figure out which controllers we need, based on the cgroup context object */ if (c->cpu_accounting) |