]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: Prevent theoretical nullptr deref in unit mask calculation 12756/head
authorChris Down <chris@chrisdown.name>
Fri, 7 Jun 2019 05:28:10 +0000 (06:28 +0100)
committerChris Down <chris@chrisdown.name>
Fri, 7 Jun 2019 05:33:53 +0000 (06:33 +0100)
src/core/cgroup.c

index a7263855dcac2b5d3f24025fd263a79e1d7f05d2..0c885d57440f414ede597d78bf846fa7c8384b2f 100644 (file)
@@ -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)