summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-15 16:47:01 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-19 08:10:29 +0900
commit80a226b26b5e00a2ef9e85d1321da44cd14d051b (patch)
tree646e2bbb1a80fae9224dc3b3acba2b48668db705 /src/libudev
parent03677889f0ef42cdc534bf3b31265a054b20a354 (diff)
downloadsystemd-80a226b26b5e00a2ef9e85d1321da44cd14d051b.tar.gz
list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() safer
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/libudev-list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libudev/libudev-list.c b/src/libudev/libudev-list.c
index 9b6625c436..d3b63b1f8f 100644
--- a/src/libudev/libudev-list.c
+++ b/src/libudev/libudev-list.c
@@ -117,7 +117,7 @@ void udev_list_cleanup(struct udev_list *list) {
list->uptodate = false;
hashmap_clear_with_destructor(list->unique_entries, udev_list_entry_free);
} else
- LIST_FOREACH_SAFE(entries, i, n, list->entries)
+ LIST_FOREACH(entries, i, list->entries)
udev_list_entry_free(i);
}