]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix OOM check
authorLuca Boccassi <bluca@debian.org>
Thu, 4 Jan 2024 11:41:31 +0000 (12:41 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 4 Jan 2024 11:41:31 +0000 (12:41 +0100)
Follow-up for 84c01612de805d88875d4d91cfcf73cf10f99447

CID#1533114

src/core/cgroup.c

index 411f59d55de1dbc2de64fec7749d867c05e746cd..bc1e601cf12ca6607df1a4973bfa4566e27cf60e 100644 (file)
@@ -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);