NetworkManager/clients
Thomas Haller 0afaaf973f
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)
(cherry picked from commit 0a011690c4)
2021-06-10 16:11:32 +02:00
..
cli cli: fix showing active state for nmcli con show with fields 2020-10-09 10:24:02 +02:00
cloud-setup cloud-setup: fix replacing IPv4 addresses during update 2021-03-12 12:43:03 +01:00
common cli: fix RETURN_STR_EMPTYUNSET() macro for printing handle_emptyunset string 2021-06-10 16:11:31 +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