mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-07 00:31:11 +00:00
nmtui: fix memory leak
Fixes: 3bda3fb60c
('nmtui: initial import of nmtui')
This commit is contained in:
parent
9c4b27e3d2
commit
1c6935e49d
|
@ -132,12 +132,14 @@ device_entry_parse(NmtDeviceEntry *deventry,
|
|||
&& (!words[1] || nm_utils_ifname_valid_kernel(words[1], NULL))) {
|
||||
*mac_address = words[0];
|
||||
*interface_name = NULL;
|
||||
g_free(words[1]);
|
||||
g_free(words);
|
||||
return TRUE;
|
||||
} else if (nm_utils_ifname_valid_kernel(words[0], NULL)
|
||||
&& (!words[1] || nm_utils_hwaddr_aton(words[1], buf, len))) {
|
||||
*interface_name = words[0];
|
||||
*mac_address = NULL;
|
||||
g_free(words[1]);
|
||||
g_free(words);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue