diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2022-12-22 11:47:55 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2022-12-22 11:48:59 +0100 |
commit | 1c6935e49dcc7c88fe26d23ceda6ed4ca3c8a9bc (patch) | |
tree | bdb77b933fc10f2accca22b40087540b6e928e45 /src/nmtui | |
parent | 9c4b27e3d28ed18372555c778de8cde7d274d042 (diff) | |
download | NetworkManager-1c6935e49dcc7c88fe26d23ceda6ed4ca3c8a9bc.tar.gz |
nmtui: fix memory leakbg/coverity
Fixes: 3bda3fb60c10 ('nmtui: initial import of nmtui')
Diffstat (limited to 'src/nmtui')
-rw-r--r-- | src/nmtui/nmt-device-entry.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nmtui/nmt-device-entry.c b/src/nmtui/nmt-device-entry.c index 7f312bd1fc..99cc43add3 100644 --- a/src/nmtui/nmt-device-entry.c +++ b/src/nmtui/nmt-device-entry.c @@ -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; } |