mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 12:50:17 +01:00
policy: fix disposal of devices list
When disposing NMPolicy all the devices in the devices hash-table should
be unregistered and removed from the hash-table.
Fixes: 7e3d090acb ('policy: refactor tracking of registered devices')
This commit is contained in:
parent
f094977a86
commit
5a87683b14
1 changed files with 1 additions and 1 deletions
|
|
@ -2892,7 +2892,7 @@ dispose(GObject *object)
|
|||
}
|
||||
|
||||
g_hash_table_iter_init(&h_iter, priv->devices);
|
||||
if (g_hash_table_iter_next(&h_iter, (gpointer *) &device, NULL)) {
|
||||
while (g_hash_table_iter_next(&h_iter, (gpointer *) &device, NULL)) {
|
||||
g_hash_table_iter_remove(&h_iter);
|
||||
devices_list_unregister(self, device);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue