NetworkManager/clients
Thomas Haller 0a011690c4
libnmt-newt: fix leak in nmt_newt_button_build_component()
Found by Coverity:

  Error: RESOURCE_LEAK (CWE-772): [#def274] [important]
  NetworkManager-1.31.3/src/libnmt-newt/nmt-newt-button.c:118: alloc_fn: Storage is returned from allocation function "g_strdup_printf".
  NetworkManager-1.31.3/src/libnmt-newt/nmt-newt-button.c:118: var_assign: Assigning: "label" = storage returned from "g_strdup_printf(" <%s>", priv->label)".
  NetworkManager-1.31.3/src/libnmt-newt/nmt-newt-button.c:119: noescape: Resource "label" is not freed or pointed-to in "nmt_newt_locale_from_utf8".
  NetworkManager-1.31.3/src/libnmt-newt/nmt-newt-button.c:125: leaked_storage: Variable "label" going out of scope leaks the storage it points to.
  #  123|       }
  #  124|
  #  125|->     return co;
  #  126|   }
  #  127|

Fixes: 3bda3fb60c ('nmtui: initial import of nmtui')
(cherry picked from commit 853f411567)
2021-06-04 21:21:52 +02:00
..
cli setting-8021x: Fix descriptions for phase2-auth & phase2-autheap 2021-02-09 17:09:31 +01:00
cloud-setup cloud-setup/tests: add test for nmcs_setting_ip_replace_ipv4_addresses() 2021-02-10 18:35:13 +01:00
common cli: fix RETURN_STR_EMPTYUNSET() macro for printing handle_emptyunset string 2021-06-04 20:21:52 +02:00
tests clients/tests: better explain how to configure localized tests 2021-02-08 16:38:54 +01:00
tui libnmt-newt: fix leak in nmt_newt_button_build_component() 2021-06-04 21:21:52 +02:00
meson.build all: add "libnm/nm-default-client.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-online.c all: add "libnm/nm-default-client.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00