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:
Dan Williams 2013-04-11 19:07:37 -05:00
parent 9f8b7ff51d
commit 4aa91e22a0

View file

@ -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));
}