From 0c79d38a48a8b7728eb5be333e4b349499ec6b61 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Wed, 18 Apr 2012 17:14:02 +0200
Subject: [PATCH] region: Fix a couple of memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=662489
---
 panels/region/gnome-region-panel-input.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/panels/region/gnome-region-panel-input.c b/panels/region/gnome-region-panel-input.c
index c4b48b5..f465b23 100644
--- a/panels/region/gnome-region-panel-input.c
+++ b/panels/region/gnome-region-panel-input.c
@@ -661,10 +661,8 @@ static void
 selection_changed (GtkTreeSelection *selection,
                    GtkBuilder       *builder)
 {
-  GList *selected;
-
-  selected = gtk_tree_selection_get_selected_rows (selection, NULL);
-  gtk_widget_set_sensitive (WID ("ok-button"), selected != NULL);
+  gtk_widget_set_sensitive (WID ("ok-button"),
+                            gtk_tree_selection_get_selected (selection, NULL, NULL));
 }
 
 static void
@@ -746,6 +744,8 @@ input_chooser_new (GtkBuilder *main_builder)
                              GNOMECC_UI_DIR "/gnome-region-panel-input-chooser.ui",
                              NULL);
   chooser = WID ("input_source_chooser");
+  g_object_set_data_full (G_OBJECT (chooser), "builder", builder, g_object_unref);
+
   filtered_list = WID ("filtered_input_source_list");
   filter_entry = WID ("input_source_filter");
 
-- 
1.7.7.6