[gnome-control-center/wip/region-panel: 32/42] region: Plug memory leaks



commit 18d6aca3eab0286706c4c5b451cc4e61f0f89e2e
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Feb 5 17:56:34 2013 +0100

    region: Plug memory leaks

 panels/region/cc-format-chooser.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/panels/region/cc-format-chooser.c b/panels/region/cc-format-chooser.c
index 5b386fe..5c0ca59 100644
--- a/panels/region/cc-format-chooser.c
+++ b/panels/region/cc-format-chooser.c
@@ -306,6 +306,8 @@ add_all_regions (GtkDialog *chooser)
         locale_ids = gnome_get_all_locales ();
         initial = cc_common_language_get_initial_languages ();
         add_regions (chooser, locale_ids, initial);
+        g_hash_table_destroy (initial);
+        g_strfreev (locale_ids);
 }
 
 static gboolean
@@ -419,7 +421,10 @@ end_refilter (EggListBox *list_box,
 static void
 cc_format_chooser_private_free (gpointer data)
 {
-        g_free (data);
+        CcFormatChooserPrivate *priv = data;
+
+        g_free (priv->region);
+        g_free (priv);
 }
 
 #define WID(name) ((GtkWidget *) gtk_builder_get_object (builder, name))


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