network: update comment as hashmap_free_with_destructor() does not exist anymore
This commit is contained in:
@@ -1163,8 +1163,7 @@ int netdev_reload(Manager *manager) {
|
||||
}
|
||||
|
||||
/* Detach old NetDev objects from Manager.
|
||||
* Note, the same object may be registered with multiple names, and netdev_detach() may drop multiple
|
||||
* entries. Hence, hashmap_free_with_destructor() cannot be used. */
|
||||
* The same object may be registered with multiple names, and netdev_detach() may drop multiple entries. */
|
||||
for (NetDev *n; (n = hashmap_first(manager->netdevs)); )
|
||||
netdev_detach(n);
|
||||
|
||||
|
||||
@@ -683,8 +683,7 @@ Manager* manager_free(Manager *m) {
|
||||
m->dhcp_pd_subnet_ids = set_free(m->dhcp_pd_subnet_ids);
|
||||
m->networks = ordered_hashmap_free(m->networks);
|
||||
|
||||
/* The same object may be registered with multiple names, and netdev_detach() may drop multiple
|
||||
* entries. Hence, hashmap_free_with_destructor() cannot be used. */
|
||||
/* The same object may be registered with multiple names, and netdev_detach() may drop multiple entries. */
|
||||
for (NetDev *n; (n = hashmap_first(m->netdevs)); )
|
||||
netdev_detach(n);
|
||||
m->netdevs = hashmap_free(m->netdevs);
|
||||
|
||||
Reference in New Issue
Block a user