xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Feb 8 15:47:13 UTC 2025


 hw/xfree86/os-support/linux/systemd-logind.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 2631cad85db59ec19cce5ce0df2e7434ba214cee
Author: Spiky Caterpillar <spikycaterpillar_tvguho at deekoo.net>
Date:   Wed Nov 16 23:18:44 2022 +0000

    No longer leak FDs on VT switch.
    
    Modified-by: Povilas Kanapickas <povilas at radix.lt>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/997>

diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c
index efe710b3c..97f8902e9 100644
--- a/hw/xfree86/os-support/linux/systemd-logind.c
+++ b/hw/xfree86/os-support/linux/systemd-logind.c
@@ -398,6 +398,11 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
             dbus_error_free(&error);
             return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
         }
+
+        /*
+         * fd will be received via DBus if and only if pause == 0, so it
+         * only needs to be closed in that code path
+         */
     } else
         return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 
@@ -432,6 +437,7 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
         info->active = TRUE;
 
         if (pdev) {
+            close(fd);
             pdev->flags &= ~XF86_PDEV_PAUSED;
         } else
             systemd_logind_set_input_fd_for_all_devs(major, minor, fd,


More information about the xorg-commit mailing list