Verified Commit d5f917e7 authored by Thomas Haller's avatar Thomas Haller
Browse files

bluetooth: fix invalid assertion in NMBluezManager:dispose()

We need to first free "priv->bzobjs", which then will unlink all bzobjs
from the lists. The assert needs to go after.

https://bugzilla.redhat.com/show_bug.cgi?id=2028427

Fixes: 4154d961 ('bluetooth: refactor BlueZ handling and let NMBluezManager cache ObjectManager data')
parent a7466c1b
Pipeline #481222 passed with stages
in 31 minutes and 35 seconds
......@@ -2852,9 +2852,7 @@ dispose(GObject *object)
* BzDBusObj instances and do necessary cleanup actions (like disconnecting devices
* or deleting panu_connection). */
nm_assert(c_list_is_empty(&priv->network_server_lst_head));
nm_assert(c_list_is_empty(&priv->process_change_lst_head));
nm_assert(priv->process_change_idle_id == 0);
nm_clear_g_source(&priv->process_change_idle_id);
g_atomic_pointer_compare_and_exchange(&nm_bt_vtable_network_server,
&priv->vtable_network_server,
......@@ -2871,6 +2869,9 @@ dispose(GObject *object)
nm_clear_pointer(&priv->bzobjs, g_hash_table_destroy);
nm_clear_pointer(&priv->conn_data_heads, g_hash_table_destroy);
nm_clear_pointer(&priv->conn_data_elems, g_hash_table_destroy);
nm_assert(c_list_is_empty(&priv->network_server_lst_head));
nm_assert(c_list_is_empty(&priv->process_change_lst_head));
}
static void
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment