summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting-vlan.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-03-04 18:09:22 -0500
committerDan Winship <danw@gnome.org>2014-03-05 11:20:54 -0500
commit50dea202a88da297c90494803c74a953cd662392 (patch)
tree6626a8f4b0334c6a9ca2a11c43f26336c1706ade /libnm-util/nm-setting-vlan.c
parentf43fa7a0acc2def577b2b52574cec1da2fd01d9b (diff)
downloadNetworkManager-50dea202a88da297c90494803c74a953cd662392.tar.gz
libnm-util: fix minor bugs in nm_setting_vlan_remove_priority_str_by_value()
Plug a leak, remove some dead code.
Diffstat (limited to 'libnm-util/nm-setting-vlan.c')
-rw-r--r--libnm-util/nm-setting-vlan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c
index ac1a4bae48..707ee222f3 100644
--- a/libnm-util/nm-setting-vlan.c
+++ b/libnm-util/nm-setting-vlan.c
@@ -479,18 +479,19 @@ nm_setting_vlan_remove_priority_str_by_value (NMSettingVlan *setting,
NMVlanPriorityMap map,
const char *str)
{
- GSList *list;
PriorityMap *item;
+ gboolean found;
g_return_val_if_fail (NM_IS_SETTING_VLAN (setting), FALSE);
g_return_val_if_fail (map == NM_VLAN_INGRESS_MAP || map == NM_VLAN_EGRESS_MAP, FALSE);
- list = get_map (setting, map);
item = priority_map_new_from_str (map, str);
if (!item)
return FALSE;
- return nm_setting_vlan_remove_priority_by_value (setting, map, item->from, item->to);
+ found = nm_setting_vlan_remove_priority_by_value (setting, map, item->from, item->to);
+ g_free (item);
+ return found;
}
/**