NetworkManager/src
Thomas Haller ceaa1c369f
core: fix leak in _config_data_get_main_auth_polkit()
Found by Coverity:

  Error: RESOURCE_LEAK (CWE-772):
  NetworkManager-1.31.3/src/core/nm-config-data.c:450: alloc_fn: Storage is returned from allocation function "nm_config_data_get_value".
  NetworkManager-1.31.3/src/core/nm-config-data.c:450: var_assign: Assigning: "str" = storage returned from "nm_config_data_get_value(self, "main", "auth-polkit", (enum [unnamed type of NMConfigGetValueFlags])6)".
  NetworkManager-1.31.3/src/core/nm-config-data.c:454: noescape: Resource "str" is not freed or pointed-to in "nm_auth_polkit_mode_from_string".
  NetworkManager-1.31.3/src/core/nm-config-data.c:465: leaked_storage: Variable "str" going out of scope leaks the storage it points to.
  #  463|           NM_SET_OUT(out_invalid_config, FALSE);
  #  464|
  #  465|->     return auth_polkit_mode;
  #  466|   }
  #  467|

Fixes: 6d7446e52f ('core: add main.auth-polkit option "root-only"')
2021-05-11 13:56:44 +02:00
..
c-list build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
c-rbtree build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
c-siphash build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
c-stdaux build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
contrib clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
core core: fix leak in _config_data_get_main_auth_polkit() 2021-05-11 13:56:44 +02:00
libnm-base iwd: Mirror NM connections to IWD network config files 2021-03-23 14:24:42 +01:00
libnm-client-aux-extern build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
libnm-client-impl build: replace ./tools/generate-docs-nm-property-infos.pl with python script 2021-05-05 15:28:17 +02:00
libnm-client-public libnm/doc: clarify GMainContext handling in NMClient documentation 2021-04-19 09:31:48 +02:00
libnm-client-test build/meson: cleanup dependencies for libnm-core-aux-intern 2021-02-28 10:42:05 +01:00
libnm-core-aux-extern build/meson: cleanup dependencies for libnm-core-aux-extern 2021-02-28 10:42:06 +01:00
libnm-core-aux-intern clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
libnm-core-impl libnm: add internal accessors for _nm_setting_bridge{,_port}_get_vlans() 2021-05-11 13:53:52 +02:00
libnm-core-intern libnm: add internal accessors for _nm_setting_bridge{,_port}_get_vlans() 2021-05-11 13:53:52 +02:00
libnm-core-public wired-setting: add support to accept-all-mac-addresses 2021-04-22 18:57:30 +00:00
libnm-glib-aux glib-aux: add nm_str_buf_append_unichar() helper 2021-05-11 13:53:52 +02:00
libnm-log-core logging: add _nm_log_full() macro 2021-04-12 16:46:01 +02:00
libnm-log-null build: remove shared/ directory 2021-02-24 12:49:13 +01:00
libnm-platform clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
libnm-std-aux clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
libnm-systemd-shared logging: add _nm_log_full() macro 2021-04-12 16:46:01 +02:00
libnm-udev-aux build/meson: cleanup dependencies for libnm-udev-aux 2021-02-28 10:42:04 +01:00
libnmc-base cli: make nmc_string_to_ternary() more flexible 2021-05-03 10:11:21 +02:00
libnmc-setting libnm-core: Rewrite comment of key-mgmt property 2021-05-06 22:23:28 +02:00
libnmt-newt nmtui: cleanup includes in "nmt-newt-utils.c" 2021-04-08 16:03:35 +02:00
linux-headers platform: move "linux/nl802154.h" to "src/linux-headers/" 2021-03-05 11:27:15 +01:00
n-acd build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
n-dhcp4 build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
nm-cloud-setup clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
nm-dispatcher dispatcher: set G_LOG_DOMAIN to "nm-dispatcher" 2021-03-18 16:54:00 +01:00
nm-initrd-generator all: only include "libnm-glib-aux/nm-uuid.h" where needed 2021-05-04 15:51:51 +02:00
nm-online build: move "clients/nm-online.c" to "src/nm-online/" 2021-03-02 08:38:26 +01:00
nmcli libnm-core: Rewrite comment of key-mgmt property 2021-05-06 22:23:28 +02:00
nmtui all: Replace deprecated NM_CONNECTION_SERIALIZE_* flags 2021-04-01 17:19:15 +02:00
tests/client cli: handle empty/unset values for "gsm.apn" property 2021-05-03 10:11:25 +02:00
meson.build tests/client: run "test-client.py" also for meson 2021-03-15 17:10:56 +01:00