libudev: set entry->list after the entry is stored in the list
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 Feb 2021 17:18:49 +0000 (02:18 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 Feb 2021 17:22:59 +0000 (02:22 +0900)
commit140716a51694ad2aa365869e3f8a741509a70959
tree2419e7c553cc858a8ca9e75227c356f3a6d1de35
parenteaef130d3fcb3c6a4d2feb50248ab3ac26f3e05b
libudev: set entry->list after the entry is stored in the list

This should not change anything. As hashmap_remove() is called before
hashmap_ensure_put(). So, even if hashmap_ensure_put() fails, a wrong
entry will not removed from the hashmap by udev_list_entry_free().
But anyway, just for safety.
src/libudev/libudev-list.c