From: Chris Down Date: Fri, 7 Jun 2019 05:28:10 +0000 (+0100) Subject: cgroup: Prevent theoretical nullptr deref in unit mask calculation X-Git-Tag: v243-rc1~303^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12756%2Fhead;p=thirdparty%2Fsystemd.git cgroup: Prevent theoretical nullptr deref in unit mask calculation --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index a7263855dca..0c885d57440 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)