mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 08:26:52 +03:00
core: check the right variable for failed open()
This commit is contained in:
parent
3b3d7d069d
commit
cd7affaeea
Notes:
Lennart Poettering
2014-05-24 11:08:06 +08:00
Backport: bugfix
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user