NetworkManager/clients
Thomas Haller 36f73d041d
cli: fix leak in print_wifi_connection()
Found by Coverity:

  Error: RESOURCE_LEAK (CWE-772): [#def297] [important]
  NetworkManager-1.31.3/src/nmcli/devices.c:4610: alloc_fn: Storage is returned from allocation function "nm_utils_ssid_to_utf8".
  NetworkManager-1.31.3/src/nmcli/devices.c:4610: var_assign: Assigning: "ssid" = storage returned from "nm_utils_ssid_to_utf8(g_bytes_get_data(ssid_bytes, NULL), g_bytes_get_size(ssid_bytes))".
  NetworkManager-1.31.3/src/nmcli/devices.c:4612: noescape: Resource "ssid" is not freed or pointed-to in "g_print".
  NetworkManager-1.31.3/src/nmcli/devices.c:4642: noescape: Resource "ssid" is not freed or pointed-to in "string_append_mecard".
  NetworkManager-1.31.3/src/nmcli/devices.c:4654: leaked_storage: Variable "ssid" going out of scope leaks the storage it points to.
  # 4652|
  # 4653|       g_print("\n");
  # 4654|-> }
  # 4655|
  # 4656|   static gboolean

Fixes: 7061341a41 ('cli: add "nmcli d wifi show"')
(cherry picked from commit e5f37477c0)
(cherry picked from commit 2e5c4abc8c)
2021-06-10 16:20:32 +02:00
..
cli cli: fix leak in print_wifi_connection() 2021-06-10 16:20:32 +02:00
cloud-setup cloud-setup: fix replacing IPv4 addresses during update 2021-03-12 12:43:03 +01:00
common libnmc-base:fix leak in NMSecretAgentSimple's request_secrets_from_ui() 2021-06-10 16:11:37 +02:00
tests Correct python black rules 2021-02-09 10:55:13 +01:00
tui libnmt-newt: fix leak in nmt_newt_button_build_component() 2021-06-10 16:11:32 +02:00
meson.build docs: generate nm-settings-docs-nmcli.xml based on nmcli meta data 2020-06-11 10:53:50 +02:00
nm-online.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00