]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: ensure no garbage is returned
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 18 Feb 2021 20:34:22 +0000 (21:34 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Feb 2021 14:23:25 +0000 (15:23 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 16cee9f0d11547d59906328df105d8407f61bd4a..0d815c16f65a688f468f875b7fa223e12751034e 100644 (file)
@@ -504,7 +504,7 @@ static int add_hierarchy(struct cgroup_ops *ops, char **clist, char *mountpoint,
        int idx;
 
        if (abspath(container_base_path))
-               return syserrno(-errno, "Container base path must be relative to controller mount");
+               return syserrno_set(-EINVAL, "Container base path must be relative to controller mount");
 
        if (!controllers && type != CGROUP2_SUPER_MAGIC)
                return syserrno_set(-EINVAL, "Empty controller list for non-unified cgroup hierarchy passed");