aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-05-18 14:43:25 +0200
committermarha <marha@users.sourceforge.net>2014-05-18 14:43:25 +0200
commita27ca45b676116ebbce31973bc1a319cad76ffbf (patch)
tree098711ced704936739bc91abbd75942a815d89db /xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
parent0b89941658d6117d17555ee28c6e5d7715673705 (diff)
parent55cf29d7f748b814a2b8eb016fbf15635d56aa53 (diff)
downloadvcxsrv-a27ca45b676116ebbce31973bc1a319cad76ffbf.tar.gz
vcxsrv-a27ca45b676116ebbce31973bc1a319cad76ffbf.tar.bz2
vcxsrv-a27ca45b676116ebbce31973bc1a319cad76ffbf.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/builtin_functions.cpp
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/linux/systemd-logind.c')
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/systemd-logind.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c b/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
index ed670a88c..73a8d55bf 100644
--- a/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
+++ b/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
@@ -162,7 +162,7 @@ cleanup:
}
void
-systemd_logind_release_fd(int _major, int _minor)
+systemd_logind_release_fd(int _major, int _minor, int fd)
{
struct systemd_logind_info *info = &logind_info;
InputInfoPtr pInfo;
@@ -174,7 +174,7 @@ systemd_logind_release_fd(int _major, int _minor)
int matches = 0;
if (!info->session || major == 0)
- return;
+ goto close;
/* Only release the fd if there is only 1 InputInfo left for this major
* and minor, otherwise other InputInfo's are still referencing the fd. */
@@ -218,6 +218,9 @@ cleanup:
if (reply)
dbus_message_unref(reply);
dbus_error_free(&error);
+close:
+ if (fd != -1)
+ close(fd);
}
int