diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-09-28 18:53:38 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-09-28 18:53:38 +0200 |
commit | 7bf91a5f9fec57c798c1bb87ad6c2b71521f3188 (patch) | |
tree | 5c1cb7a7b849cb379fe82a8767d2f358a1f69a63 | |
parent | ca6478716dfdc623e4046d772f4473420a25b8a7 (diff) |
logind: close_device should not close fd
-rw-r--r-- | libseat/backend/logind.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libseat/backend/logind.c b/libseat/backend/logind.c index 98d7219..5afb77a 100644 --- a/libseat/backend/logind.c +++ b/libseat/backend/logind.c @@ -130,7 +130,6 @@ static int close_device(struct libseat *base, int device_id) { struct stat st = {0}; if (fstat(fd, &st) < 0) { log_errorf("Could not stat fd %d", fd); - close(fd); return -1; } if (dev_is_drm(st.st_rdev)) { @@ -138,7 +137,6 @@ static int close_device(struct libseat *base, int device_id) { log_debugf("DRM device closed, current total: %d", session->has_drm); assert(session->has_drm >= 0); } - close(fd); sd_bus_message *msg = NULL; sd_bus_error error = SD_BUS_ERROR_NULL; |