mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
libudev: unset uptodate flag before free()ing entries
udev_list_entry_free() also removes the entry from LIST if the flag is set. This slightly optimizes the cleanup logic.
This commit is contained in:
@@ -115,8 +115,8 @@ void udev_list_cleanup(struct udev_list *list) {
|
||||
return;
|
||||
|
||||
if (list->unique) {
|
||||
hashmap_clear_with_destructor(list->unique_entries, udev_list_entry_free);
|
||||
list->uptodate = false;
|
||||
hashmap_clear_with_destructor(list->unique_entries, udev_list_entry_free);
|
||||
} else
|
||||
LIST_FOREACH_SAFE(entries, i, n, list->entries)
|
||||
udev_list_entry_free(i);
|
||||
|
||||
Reference in New Issue
Block a user