From: Luca Boccassi Date: Thu, 4 Jan 2024 11:41:31 +0000 (+0100) Subject: core: fix OOM check X-Git-Tag: v256-rc1~1285^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cae58298dd70630e722beedcf671b098ef172dbd;p=thirdparty%2Fsystemd.git core: fix OOM check Follow-up for 84c01612de805d88875d4d91cfcf73cf10f99447 CID#1533114 --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 411f59d55de..bc1e601cf12 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -216,7 +216,7 @@ int cgroup_context_add_io_device_limit_dup(CGroupContext *c, CGroupIODeviceLimit assert(l); n = new0(CGroupIODeviceLimit, 1); - if (!l) + if (!n) return -ENOMEM; n->path = strdup(l->path);