core: remove possibly dangling idle handler in ip6 manager

If things happen just right, where a bond is the first device to use
IPv6 and thus has the only reference to the NMIP6Manager, and the
RTM_NEWROUTE event comes in and triggers manager_request_ip6_info()
but then the device is removed by 'rmmod bonding', the call to
manager_request_ip6_info() could be dangling after the IP6Manager
has been disposed.  Fix that.
This commit is contained in:
Dan Williams 2013-06-18 14:41:26 -05:00
parent 790b3a753c
commit 4182deb398

View file

@ -1311,9 +1311,8 @@ manager_request_ip6_info (gpointer user_data)
NMIP6Manager *manager = user_data;
NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager);
nm_netlink_monitor_request_ip6_info (priv->monitor, NULL);
priv->request_ip6_info_id = 0;
nm_netlink_monitor_request_ip6_info (priv->monitor, NULL);
return FALSE;
}
@ -1651,6 +1650,9 @@ finalize (GObject *object)
{
NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (object);
if (priv->request_ip6_info_id)
g_source_remove (priv->request_ip6_info_id);
g_signal_handler_disconnect (priv->monitor, priv->netlink_id);
g_hash_table_destroy (priv->devices);