[gnome-control-center] thunderbolt: plug leak when name owner changes



commit 31a77ad0607b467512463d54a55de1b562d6dd67
Author: Christian Kellner <christian kellner me>
Date:   Wed Jan 23 17:54:34 2019 +0100

    thunderbolt: plug leak when name owner changes
    
    Should not happen very often in the real world, but ever time the
    name owner changed (i.e. boltd was restarted) the name_owner
    variable was leaked.

 panels/thunderbolt/cc-bolt-panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/thunderbolt/cc-bolt-panel.c b/panels/thunderbolt/cc-bolt-panel.c
index b6a5cd607..8defff3d0 100644
--- a/panels/thunderbolt/cc-bolt-panel.c
+++ b/panels/thunderbolt/cc-bolt-panel.c
@@ -470,11 +470,11 @@ cc_bolt_panel_set_no_thunderbolt (CcBoltPanel *panel,
 static void
 cc_bolt_panel_name_owner_changed (CcBoltPanel *panel)
 {
+  g_autofree char *name_owner = NULL;
   BoltClient *client = panel->client;
   BoltSecurity sl;
   gboolean notb = TRUE;
   const char *text = NULL;
-  const char *name_owner;
 
   name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY (panel->client));
 


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