1
0
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:
Łukasz Stelmach 2014-05-08 12:57:26 +02:00 committed by David Herrmann
parent 3b3d7d069d
commit cd7affaeea
Notes: Lennart Poettering 2014-05-24 11:08:06 +08:00
Backport: bugfix

View 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;
}