summaryrefslogtreecommitdiff
path: root/libudev/libudev-enumerate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libudev/libudev-enumerate.c')
-rw-r--r--libudev/libudev-enumerate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c
index e46bc087fa..9694797d35 100644
--- a/libudev/libudev-enumerate.c
+++ b/libudev/libudev-enumerate.c
@@ -274,6 +274,9 @@ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enumerate *ude
/* skip to be delayed devices, and add them to the end of the list */
if (devices_delay_end(udev_enumerate->udev, entry->syspath)) {
syspath_add(udev_enumerate, entry->syspath);
+ /* need to update prev here for the case realloc() gives
+ a different address */
+ prev = &udev_enumerate->devices[i];
continue;
}