device: remove unnecessary object reference operations

Since commit 0175056a6d, 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 6fba9fd2e5 to fix
a crash. It seems however the proper fix would have been commit
0175056a6d, 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
This commit is contained in:
Shih-Yuan Lee (FourDollars) 2016-05-06 13:46:00 +08:00 committed by Thomas Haller
parent 0e7f93faea
commit 831038a5c7

View file

@ -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;