1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00

udev: fix potential infinite loop

This commit is contained in:
Yu Watanabe 2021-04-07 22:36:12 +09:00
parent 19ed9a114c
commit 5a6e56ec17

View File

@ -395,8 +395,9 @@ static int dev_pci_slot(sd_device *dev, struct netnames *names) {
break;
}
if (sd_device_get_sysname(hotplug_slot_dev, &sysname) < 0)
continue;
r = sd_device_get_sysname(hotplug_slot_dev, &sysname);
if (r < 0)
return log_device_debug_errno(hotplug_slot_dev, r, "Failed to get sysname: %m");
FOREACH_DIRENT_ALL(dent, dir, break) {
_cleanup_free_ char *address = NULL;