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

network: use hashmap_clear_with_destructor() at one more place

This commit is contained in:
Yu Watanabe 2018-11-12 15:32:26 +09:00
parent 3e5700428e
commit c6dbb5c43f

View File

@ -798,14 +798,12 @@ int netdev_load_one(Manager *manager, const char *filename) {
int netdev_load(Manager *manager) {
_cleanup_strv_free_ char **files = NULL;
NetDev *netdev;
char **f;
int r;
assert(manager);
while ((netdev = hashmap_first(manager->netdevs)))
netdev_unref(netdev);
hashmap_clear_with_destructor(manager->netdevs, netdev_unref);
r = conf_files_list_strv(&files, ".netdev", NULL, 0, network_dirs);
if (r < 0)