From fecc2eca87b43fbdbc2cc2ad260bdb7519d3b8d7 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Fri, 20 Sep 2013 17:19:30 +0200 Subject: [PATCH] network: Correctly unref NetDevice instances when needed We have to take the GtkListStore own reference into account. https://bugzilla.gnome.org/show_bug.cgi?id=708468 --- panels/network/cc-network-panel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c index cab9f4c29..e17f6f339 100644 --- a/panels/network/cc-network-panel.c +++ b/panels/network/cc-network-panel.c @@ -757,6 +757,7 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device) PANEL_DEVICES_COLUMN_SORT, panel_device_to_sortable_string (device), PANEL_DEVICES_COLUMN_OBJECT, net_device, -1); + g_object_unref (net_device); g_signal_connect (device, "state-changed", G_CALLBACK (state_changed_cb), panel); @@ -898,6 +899,7 @@ nm_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcNetworkPanel *pan } i++; } + g_object_unref (object); out: g_list_free (panels); } @@ -1323,6 +1325,7 @@ remove_connection (GtkToolButton *button, CcNetworkPanel *panel) /* delete the object */ net_object_delete (object); + g_object_unref (object); } static void