[Xfce4-commits] <xfce4-xkb-plugin:master> Don't leak registry objects.

Jérôme Guelfucci noreply at xfce.org
Fri Apr 29 11:38:01 CEST 2011


Updating branch refs/heads/master
         to 5b8e84bbc9c8035a0d328e4e009dd39bf88dad1f (commit)
       from 979a1a2bc2bce620d2b430582105c936f8d42f9a (commit)

commit 5b8e84bbc9c8035a0d328e4e009dd39bf88dad1f
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Fri Apr 29 10:39:02 2011 +0200

    Don't leak registry objects.

 panel-plugin/xkb-config.c          |    1 +
 panel-plugin/xkb-settings-dialog.c |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index da89b6b..7712a12 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -147,6 +147,7 @@ xkb_config_initialize_xkb_options (t_xkb_settings *settings)
 
     registry = xkl_config_registry_get_instance (config->engine);
     xkl_config_registry_load (registry, FALSE);
+    g_object_unref (registry);
 
     config_item = xkl_config_item_new ();
 
diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c
index e56626e..b230fa9 100644
--- a/panel-plugin/xkb-settings-dialog.c
+++ b/panel-plugin/xkb-settings-dialog.c
@@ -715,6 +715,8 @@ xfce_xkb_configure (XfcePanelPlugin *plugin,
 
     g_signal_connect (renderer2, "toggled", G_CALLBACK (xkb_settings_default_layout_toggled), xkb);
 
+    g_object_unref (registry);
+
     gtk_widget_show (settings_dialog);
 }
 
@@ -807,6 +809,7 @@ xkb_settings_layout_dialog_run (void)
 
     xkl_config_registry_foreach_layout (registry, (ConfigItemProcessFunc)
             xkb_settings_add_layout_to_available_layouts_tree, treestore);
+    g_object_unref (registry);
 
     renderer = gtk_cell_renderer_text_new ();
 



More information about the Xfce4-commits mailing list