[gnome-control-center] network: Correctly unref NetDevice instances when needed
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Correctly unref NetDevice instances when needed
- Date: Tue, 1 Oct 2013 08:02:05 +0000 (UTC)
commit fecc2eca87b43fbdbc2cc2ad260bdb7519d3b8d7
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Sep 20 17:19:30 2013 +0200
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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index cab9f4c..e17f6f3 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]