summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShih-Yuan Lee (FourDollars) <sylee@canonical.com>2016-05-06 13:46:00 +0800
committerThomas Haller <thaller@redhat.com>2016-05-06 13:50:29 +0200
commit831038a5c7c53b83e2fcd06e4913fe0a16942a7f (patch)
tree5c3f3f4dc43d4899c9ac01d8090f8deb9dac54ca
parent0e7f93faea67183f200b584d344e4940c0997f19 (diff)
downloadNetworkManager-831038a5c7c53b83e2fcd06e4913fe0a16942a7f.tar.gz
device: remove unnecessary object reference operations
Since commit 0175056a6d70bafdaf1042eb8f5e1ef57484a3f2, it is unnecessary to operate object reference when invoking g_idle_add so it is unnecessary to operate object reference in GSourceFunc too. Taking an additional reference to the device during update_ip_config() was introduced by commit 6fba9fd2e55216ba12c77e4567c48d79289cc9b7 to fix a crash. It seems however the proper fix would have been commit 0175056a6d70bafdaf1042eb8f5e1ef57484a3f2, to avoid any IP config change events after disposing of the device starts. https://mail.gnome.org/archives/networkmanager-list/2016-May/msg00002.html https://mail.gnome.org/archives/networkmanager-list/2016-May/msg00009.html
-rw-r--r--src/devices/nm-device.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index bf4b92db86..8e15e1e63e 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -9096,9 +9096,7 @@ queued_ip4_config_change (gpointer user_data)
return TRUE;
priv->queued_ip4_config_id = 0;
- g_object_ref (self);
update_ip4_config (self, FALSE);
- g_object_unref (self);
set_unmanaged_external_down (self, TRUE);
@@ -9122,7 +9120,6 @@ queued_ip6_config_change (gpointer user_data)
return TRUE;
priv->queued_ip6_config_id = 0;
- g_object_ref (self);
update_ip6_config (self, FALSE);
if ( nm_platform_link_get (NM_PLATFORM_GET, priv->ifindex)
@@ -9158,8 +9155,6 @@ queued_ip6_config_change (gpointer user_data)
g_slist_free_full (priv->dad6_failed_addrs, g_free);
priv->dad6_failed_addrs = NULL;
- g_object_unref (self);
-
set_unmanaged_external_down (self, TRUE);
return FALSE;