mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-03 23:38:39 +00:00
core: check the right variable for failed open()
(cherry picked from commitcd7affaeea) (cherry picked from commitd7c1de4f36)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
84338737f0
commit
cb7df46774
+1
-1
@@ -661,7 +661,7 @@ int manager_setup_cgroup(Manager *m) {
|
||||
close_nointr_nofail(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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user