aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Xinput.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Xinput.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index bc6b73f91..4e8060b0f 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -770,10 +770,8 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
FreeInputAttributes(pInp->attrs);
- if (pInp->flags & XI86_SERVER_FD) {
- systemd_logind_release_fd(pInp->major, pInp->minor);
- close(pInp->fd);
- }
+ if (pInp->flags & XI86_SERVER_FD)
+ systemd_logind_release_fd(pInp->major, pInp->minor, pInp->fd);
/* Remove the entry from the list. */
if (pInp == xf86InputDevs)
@@ -873,8 +871,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
sizeof(pInfo) * (new_input_devices_count + 1));
new_input_devices[new_input_devices_count] = pInfo;
new_input_devices_count++;
- systemd_logind_release_fd(pInfo->major, pInfo->minor);
- close(fd);
+ systemd_logind_release_fd(pInfo->major, pInfo->minor, fd);
return BadMatch;
}
pInfo->fd = fd;