mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-17 09:10:47 +02:00
libnm-util: fix mis-freed VLAN priority list element
We want to free the element data, then remove the element from the list. Instead the code freed the element data, then treated the element data pointer as a GSList link, which is completely wrong.
This commit is contained in:
parent
9f8b7ff51d
commit
4aa91e22a0
1 changed files with 2 additions and 2 deletions
|
|
@ -408,8 +408,8 @@ nm_setting_vlan_remove_priority (NMSettingVlan *setting,
|
|||
list = get_map (setting, map);
|
||||
g_return_if_fail (idx < g_slist_length (list));
|
||||
|
||||
item = g_slist_nth_data (list, idx);
|
||||
priority_map_free ((PriorityMap *) item);
|
||||
item = g_slist_nth (list, idx);
|
||||
priority_map_free ((PriorityMap *) (item->data));
|
||||
set_map (setting, map, g_slist_delete_link (list, item));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue