mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 15:50:07 +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)
This commit is contained in:
parent
c456bfa7c4
commit
d23c6040f8
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