From 88c27c5352ef89bb444ce77bf419440eb8d5f6c0 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 4 Feb 2021 15:01:45 +0100 Subject: [PATCH] cgroups: fix argument vetting in cgroup_attach() Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index bdfbeaebc..3db1b60ac 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -3504,7 +3504,7 @@ int cgroup_attach(const struct lxc_conf *conf, const char *name, __do_close int unified_fd = -EBADF; int ret; - if (!conf || is_empty_string(name) || !is_empty_string(lxcpath) || pid <= 0) + if (!conf || is_empty_string(name) || is_empty_string(lxcpath) || pid <= 0) return ret_errno(EINVAL); unified_fd = lxc_cmd_get_cgroup2_fd(name, lxcpath); -- 2.47.2