[gnome-control-center] network: Fix reference leak of NetProxy
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Fix reference leak of NetProxy
- Date: Thu, 19 Mar 2015 15:33:57 +0000 (UTC)
commit 2cf597eb973d3a3692467129cb45be9dec4381b3
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 18 18:59:24 2015 +0100
network: Fix reference leak of NetProxy
Every time we got the list of devices from the devices GtkListStore, we
were leaking the only element that wasn't a NetDevice, the proxy page.
Make sure to unref' it by hand if we're not going to add it to the list
(the elements of which will be unref'ed properly).
https://bugzilla.gnome.org/show_bug.cgi?id=746411
panels/network/cc-network-panel.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 830eebe..4edae7a 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -502,6 +502,8 @@ cc_network_panel_get_devices (CcNetworkPanel *panel)
-1);
if (NET_IS_DEVICE (object))
g_ptr_array_add (devices, object);
+ else
+ g_object_unref (object);
} while (gtk_tree_model_iter_next (model, &iter));
return devices;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]