mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-19 14:50:39 +02:00
cli: fix leak in show_device_lldp_list() for nmc_parse_lldp_capabilities()
This commit is contained in:
parent
589d51ca9d
commit
a1e12c01df
1 changed files with 5 additions and 2 deletions
|
|
@ -4578,8 +4578,11 @@ show_device_lldp_list (NMDevice *device, NmCli *nmc, const char *fields_str, int
|
|||
if (nm_lldp_neighbor_get_attr_string_value (neighbor, NM_LLDP_ATTR_SYSTEM_DESCRIPTION, &str))
|
||||
set_val_strc (arr, 6, str);
|
||||
|
||||
if (nm_lldp_neighbor_get_attr_uint_value (neighbor, NM_LLDP_ATTR_SYSTEM_CAPABILITIES, &value))
|
||||
set_val_str (arr, 7, g_strdup_printf ("%u (%s)", value, nmc_parse_lldp_capabilities (value)));
|
||||
if (nm_lldp_neighbor_get_attr_uint_value (neighbor, NM_LLDP_ATTR_SYSTEM_CAPABILITIES, &value)) {
|
||||
gs_free char *tmp = NULL;
|
||||
|
||||
set_val_str (arr, 7, g_strdup_printf ("%u (%s)", value, (tmp = nmc_parse_lldp_capabilities (value))));
|
||||
}
|
||||
|
||||
if (nm_lldp_neighbor_get_attr_uint_value (neighbor, NM_LLDP_ATTR_IEEE_802_1_PVID, &value))
|
||||
set_val_str (arr, 8, g_strdup_printf ("%u", value));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue