[gnome-control-center/gnome-3-8] network: Correctly unref NetDevice instances when needed



commit e59bfaaab70f86b56ad69aaf839c00e9a9ed43be
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 480763e..3c17897 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -741,6 +741,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);
 
@@ -882,6 +883,7 @@ nm_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcNetworkPanel *pan
                 }
                 i++;
         }
+        g_object_unref (object);
 out:
         g_list_free (panels);
 }
@@ -1307,6 +1309,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]