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.

(cherry picked from commit cfc0565604)
This commit is contained in:
Thomas Haller 2018-10-19 15:37:32 +02:00
parent 60f0b9111d
commit 06f06dbf0c

View file

@ -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);