mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 04:08:01 +02: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.
This commit is contained in:
parent
1913a4d259
commit
cfc0565604
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