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
This commit is contained in:
parent
d8bfc9e937
commit
fecc2eca87
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue