[PATCH] device: Remove unnecessary object reference operations
- From: "Shih-Yuan Lee (FourDollars)" <sylee canonical com>
- To: networkmanager-list gnome org
- Subject: [PATCH] device: Remove unnecessary object reference operations
- Date: Fri, 6 May 2016 13:46:00 +0800
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.
---
src/devices/nm-device.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index bf4b92d..8e15e1e 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;
--
2.7.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]