mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-19 04:10:31 +01:00
netlink: don't ref/unref the singleton
This commit is contained in:
parent
d9e87d933b
commit
363dece23b
5 changed files with 1 additions and 19 deletions
|
|
@ -1654,7 +1654,6 @@ finalize (GObject *object)
|
|||
g_signal_handler_disconnect (priv->monitor, priv->netlink_id);
|
||||
|
||||
g_hash_table_destroy (priv->devices);
|
||||
g_object_unref (priv->monitor);
|
||||
nl_cache_free (priv->addr_cache);
|
||||
nl_cache_free (priv->route_cache);
|
||||
|
||||
|
|
|
|||
|
|
@ -725,11 +725,6 @@ dispose (GObject *object)
|
|||
priv->netlink_id = 0;
|
||||
}
|
||||
|
||||
if (priv->monitor) {
|
||||
g_object_unref (priv->monitor);
|
||||
priv->monitor = NULL;
|
||||
}
|
||||
|
||||
g_free (priv->nas_ifname);
|
||||
priv->nas_ifname = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -572,8 +572,6 @@ dispose (GObject *object)
|
|||
if (priv->link_disconnected_id)
|
||||
g_signal_handler_disconnect (priv->monitor, priv->link_disconnected_id);
|
||||
|
||||
g_object_unref (priv->monitor);
|
||||
|
||||
g_signal_handler_disconnect (priv->parent, priv->parent_state_id);
|
||||
g_object_unref (priv->parent);
|
||||
|
||||
|
|
|
|||
|
|
@ -344,11 +344,6 @@ dispose (GObject *object)
|
|||
priv->link_disconnected_id = 0;
|
||||
}
|
||||
|
||||
if (priv->monitor) {
|
||||
g_object_unref (priv->monitor);
|
||||
priv->monitor = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (nm_device_wired_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -704,7 +704,6 @@ nm_netlink_get_default_handle (void)
|
|||
|
||||
self = nm_netlink_monitor_get ();
|
||||
nlh = NM_NETLINK_MONITOR_GET_PRIVATE (self)->nlh_sync;
|
||||
g_object_unref (self);
|
||||
|
||||
return nlh;
|
||||
}
|
||||
|
|
@ -723,7 +722,6 @@ nm_netlink_iface_to_index (const char *iface)
|
|||
|
||||
nl_cache_refill (priv->nlh_sync, priv->link_cache);
|
||||
idx = rtnl_link_name2i (priv->link_cache, iface);
|
||||
g_object_unref (self);
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
|
@ -758,7 +756,6 @@ nm_netlink_index_to_iface (int idx)
|
|||
buf = NULL;
|
||||
}
|
||||
|
||||
g_object_unref (self);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
@ -777,7 +774,6 @@ nm_netlink_index_to_rtnl_link (int idx)
|
|||
|
||||
nl_cache_refill (priv->nlh_sync, priv->link_cache);
|
||||
ret = rtnl_link_get (priv->link_cache, idx);
|
||||
g_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -807,8 +803,7 @@ nm_netlink_monitor_get (void)
|
|||
g_object_unref (singleton);
|
||||
singleton = NULL;
|
||||
}
|
||||
} else
|
||||
g_object_ref (singleton);
|
||||
}
|
||||
|
||||
return singleton;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue