mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-13 19:00:28 +01:00
libnm: fix re-entrancy of NMClient.dispose() for _init_release_all()
GObject's dispose() functions may be called multiple times to break reference cycles. As dispose() calls _init_release_all(), the object might already be partially destroyed. Fixes:ce0e898fb4('libnm: refactor caching of D-Bus objects in NMClient') (cherry picked from commitef6edd8dbd) (cherry picked from commit9659db281f)
This commit is contained in:
parent
2bec392e56
commit
a744397ad5
1 changed files with 2 additions and 2 deletions
|
|
@ -6976,7 +6976,7 @@ _init_release_all (NMClient *self)
|
|||
nm_assert (c_list_is_empty (&priv->dbus_objects_lst_head_on_dbus));
|
||||
nm_assert (c_list_is_empty (&priv->dbus_objects_lst_head_with_nmobj_not_ready));
|
||||
nm_assert (c_list_is_empty (&priv->dbus_objects_lst_head_with_nmobj_ready));
|
||||
nm_assert (g_hash_table_size (priv->dbus_objects) == 0);
|
||||
nm_assert (nm_g_hash_table_size (priv->dbus_objects) == 0);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
@ -7833,7 +7833,7 @@ dispose (GObject *object)
|
|||
nm_assert (c_list_is_empty (&priv->queue_notify_lst_head));
|
||||
nm_assert (c_list_is_empty (&priv->notify_event_lst_head));
|
||||
nm_assert (c_list_is_empty (&self->obj_base.queue_notify_lst));
|
||||
nm_assert (!priv->dbus_objects || g_hash_table_size (priv->dbus_objects) == 0);
|
||||
nm_assert (nm_g_hash_table_size (priv->dbus_objects) == 0);
|
||||
|
||||
nml_dbus_property_o_clear_many (priv->nm.property_o, G_N_ELEMENTS (priv->nm.property_o), NULL);
|
||||
nml_dbus_property_ao_clear_many (priv->nm.property_ao, G_N_ELEMENTS (priv->nm.property_ao), NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue