[sound-juicer] prefs: Don't leak combobox model



commit 9f470c3512701d8007e638cb59f9f3f67fca6ed8
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Fri Jan 9 18:58:35 2015 +0000

    prefs: Don't leak combobox model
    
    GtkComboBox takes it's own reference to the model so we need to free
    ours.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742802

 src/sj-prefs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/sj-prefs.c b/src/sj-prefs.c
index 7075137..396411c 100644
--- a/src/sj-prefs.c
+++ b/src/sj-prefs.c
@@ -336,6 +336,7 @@ static void populate_pattern_combo (GtkComboBox *combo, const FilePattern *patte
     gtk_list_store_set (store, &iter, 0, _(patterns[i].name), 1, patterns[i].pattern, -1);
   }
   gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store));
+  g_object_unref (store);
 }
 
 static void
@@ -374,6 +375,7 @@ static void populate_profile_combo (GtkComboBox *combo)
   }
 
   gtk_combo_box_set_model (GTK_COMBO_BOX (combo), model);
+  g_object_unref (model);
 }
 
 /**


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