NetworkManager/src
Thomas Haller c47c823c9d
glib-aux/tests: avoid coverity warning in test_nm_g_source_sentinel()
Coverity wrongly think there is a use after free in the test:

    Error: USE_AFTER_FREE (CWE-416): [#def559] [important]
    NetworkManager-1.31.90/src/libnm-glib-aux/tests/test-shared-general.c:1305: alias: Assigning: "s1" = "_s". Now both point to the same storage.
    NetworkManager-1.31.90/src/libnm-glib-aux/tests/test-shared-general.c:1324: freed_arg: "g_source_unref" frees "s1".
    NetworkManager-1.31.90/src/libnm-glib-aux/tests/test-shared-general.c:1330: deref_after_free: Dereferencing freed pointer "s1".
    # 1328|               s2 = nm_g_source_sentinel_get(0);
    # 1329|               g_assert(s2 == s1);
    # 1330|->             g_assert_cmpint(g_atomic_int_get(&s1->ref_count), >=, 1);
    # 1331|           }
    # 1332|       }

Rework the code in the hope to avoid the false warning.

(cherry picked from commit 7825609f1f)
2021-06-11 22:44:31 +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: avoid accessing opaque NMSetting type 2021-06-11 22:36:50 +02:00
libnm-base lgtm: suppress lgtm[cpp/duplicate-include-guard] warning in ethtool header 2021-06-01 17:54:07 +02: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 Revert "libnm: introduce the new get_ports() in bridge/bond API" 2021-06-02 12:05:26 +02:00
libnm-client-public Revert "libnm: introduce the new get_ports() in bridge/bond API" 2021-06-02 12:05:26 +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 libnm: add nm_auto_unref_tc_action cleanup macro for NMTCAction 2021-05-11 13:56:45 +02:00
libnm-core-impl libnm: hide NMSimpleConnection type from public headers 2021-06-11 22:36:51 +02:00
libnm-core-intern libnm: verify and normalize "connection.secondaries" 2021-06-04 09:29:25 +02:00
libnm-core-public libnm: hide NMSimpleConnection type from public headers 2021-06-11 22:36:51 +02:00
libnm-glib-aux glib-aux/tests: avoid coverity warning in test_nm_g_source_sentinel() 2021-06-11 22:44:31 +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 platform: avoid wrong coverity warning in nmp_utils_sysctl_open_netdir() 2021-06-11 22:44:31 +02:00
libnm-std-aux clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
libnm-systemd-core systemd: merge branch systemd into main 2021-06-01 14:26:51 +02:00
libnm-systemd-shared systemd: merge branch systemd into main 2021-06-01 14:26:51 +02:00
libnm-udev-aux build/meson: cleanup dependencies for libnm-udev-aux 2021-02-28 10:42:04 +01:00
libnmc-base libnmc-base: make transfer of memory ownership in try_spawn_vpn_auth_helper() clearer 2021-05-27 10:42:10 +02:00
libnmc-setting libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
libnmt-newt libnmt-newt: use cleanup macro in nmt_newt_button_build_component() 2021-05-11 13:56:50 +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-daemon-helper nm-daemon-helper: implement 'resolve-address' operation 2021-06-11 21:59:11 +02:00
nm-dispatcher core,nm-dispatcher: use nm_utils_get_process_exit_status_desc() 2021-06-11 21:59:11 +02: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 bash-completion: localize the prev variable 2021-06-08 11:38:45 +02:00
nmtui tui: use internal _nm_utils_ip4_prefix_to_netmask() helper 2021-05-11 13:56:48 +02:00
tests/client cli: handle empty/unset values for "gsm.apn" property 2021-05-03 10:11:25 +02:00
meson.build core: add infrastructure for spawning a helper process 2021-06-11 21:59:11 +02:00