summaryrefslogtreecommitdiff
path: root/src/core/cgroup.c
diff options
context:
space:
mode:
authorƁukasz Stelmach <l.stelmach@samsung.com>2014-05-08 12:57:26 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-05-08 13:24:34 +0200
commitcd7affaeea16d3904354b810a292e594dfef25dd (patch)
tree70a4357bad4dc74f82a5a19e4e6a6fd3170372ca /src/core/cgroup.c
parent3b3d7d069d10d53336dbada1c67f739e3492b218 (diff)
core: check the right variable for failed open()
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r--src/core/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 3aeaf56656..29ab645f9f 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -920,7 +920,7 @@ int manager_setup_cgroup(Manager *m) {
safe_close(m->pin_cgroupfs_fd);
m->pin_cgroupfs_fd = open(path, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY|O_NONBLOCK);
- if (r < 0) {
+ if (m->pin_cgroupfs_fd < 0) {
log_error("Failed to open pin file: %m");
return -errno;
}