summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-10-19 15:37:32 +0200
committerThomas Haller <thaller@redhat.com>2018-10-22 13:17:53 +0200
commitcfc056560461c9444177c3b4f333e395c2cab5df (patch)
treed7e40bf2dca3960fd4bb087f40dad410d75cadaa
parent1913a4d2590d42413b04c0cf86321286bb2e2dbd (diff)
downloadNetworkManager-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.c2
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);