mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-27 09:20:32 +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') (cherry picked from commit5a87683b14) (cherry picked from commitd23c6040f8)
This commit is contained in:
parent
0946610c54
commit
962ecdd3eb
1 changed files with 1 additions and 1 deletions
|
|
@ -2893,7 +2893,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