[gdm/rhel-7.9: 28/51] xdmcp-display-factory: Clear launch environment when done with it




commit 8c4f2b65efa0c98fe6bca69dfef5a0e347acb8ef
Author: Ray Strode <rstrode redhat com>
Date:   Tue Sep 15 11:28:48 2020 -0400

    xdmcp-display-factory: Clear launch environment when done with it
    
    The XDMCP disply factory examines the sessions of its displays'
    launch environments when the displays change status.
    
    Unfortunately it leaks a reference to the launch environment when
    doing that.
    
    This commit fixes the reference leak which leads to an fd leak.

 daemon/gdm-xdmcp-display-factory.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
index 5b5786c6f..04ba60af1 100644
--- a/daemon/gdm-xdmcp-display-factory.c
+++ b/daemon/gdm-xdmcp-display-factory.c
@@ -2122,6 +2122,8 @@ on_display_status_changed (GdmDisplay             *display,
                 g_assert_not_reached ();
                 break;
         }
+
+        g_clear_object (&launch_environment);
 }
 
 static GdmDisplay *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]