chiark / gitweb /
core: check the right variable for failed open()
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 8 May 2014 10:57:26 +0000 (12:57 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 8 May 2014 11:24:34 +0000 (13:24 +0200)
src/core/cgroup.c

index 3aeaf5665622dc41cd85d47337af59308ccf8f21..29ab645f9f169c34ca072adc73064fd499db83a7 100644 (file)
@@ -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;
         }