diff options
author | Thomas Haller <thaller@redhat.com> | 2018-10-19 15:37:32 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-10-22 13:17:53 +0200 |
commit | cfc056560461c9444177c3b4f333e395c2cab5df (patch) | |
tree | d7e40bf2dca3960fd4bb087f40dad410d75cadaa | |
parent | 1913a4d2590d42413b04c0cf86321286bb2e2dbd (diff) | |
download | NetworkManager-cfc056560461c9444177c3b4f333e395c2cab5df.tar.gz |
platform/tests: don't compare dangling pointer in "test-nmp-object.c"
This wouldn't even dereference the dangling pointer, but
merely comparing it for pointer equality. Still, it's actually
undefined behavior. Avoid it.
-rw-r--r-- | src/platform/tests/test-nmp-object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/tests/test-nmp-object.c b/src/platform/tests/test-nmp-object.c index 047d7a854b..004ea2739a 100644 --- a/src/platform/tests/test-nmp-object.c +++ b/src/platform/tests/test-nmp-object.c @@ -587,7 +587,7 @@ main (int argc, char **argv) while (global.udev_devices) { udev_device_unref (global.udev_devices->data); - global.udev_devices = g_list_remove (global.udev_devices, global.udev_devices->data); + global.udev_devices = g_list_delete_link (global.udev_devices, global.udev_devices); } nm_udev_client_unref (udev_client); |