mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 16:50:17 +01:00
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:
parent
60f0b9111d
commit
06f06dbf0c
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue