[gnome-control-center] wacom: Fix memleak
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: Fix memleak
- Date: Thu, 16 Feb 2012 18:34:53 +0000 (UTC)
commit f167307efe1831fdb1faab2dacb4df668f6084e6
Author: Bastien Nocera <hadess hadess net>
Date: Thu Feb 16 18:54:01 2012 +0100
wacom: Fix memleak
The list store was leaked as the combobox is supposed
to be the only one holding a reference.
panels/wacom/cc-wacom-mapping-panel.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-mapping-panel.c b/panels/wacom/cc-wacom-mapping-panel.c
index 8793d2b..0b5c020 100644
--- a/panels/wacom/cc-wacom-mapping-panel.c
+++ b/panels/wacom/cc-wacom-mapping-panel.c
@@ -82,9 +82,9 @@ update_monitor_chooser (CcWacomMappingPanel *self)
store = gtk_list_store_new (MONITOR_NUM_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
gtk_combo_box_set_model (GTK_COMBO_BOX(self->priv->combobox), GTK_TREE_MODEL(store));
- if (self->priv->device == NULL)
- {
+ if (self->priv->device == NULL) {
gtk_widget_set_sensitive (GTK_WIDGET(self->priv->combobox), FALSE);
+ g_object_unref (store);
return;
}
@@ -117,6 +117,8 @@ update_monitor_chooser (CcWacomMappingPanel *self)
g_free (text);
}
}
+
+ g_object_unref (store);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]