1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

Merge pull request #10723 from yuwata/fix-oss-fuzz-11345

network: add missing free() in network_free()
This commit is contained in:
Lennart Poettering 2018-11-11 15:42:46 +01:00 committed by GitHub
commit a357f4a6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -342,9 +342,7 @@ void network_free(Network *network) {
AddressLabel *label; AddressLabel *label;
Prefix *prefix; Prefix *prefix;
Address *address; Address *address;
NetDev *netdev;
Route *route; Route *route;
Iterator i;
if (!network) if (!network)
return; return;
@ -369,17 +367,15 @@ void network_free(Network *network) {
strv_free(network->search_domains); strv_free(network->search_domains);
strv_free(network->route_domains); strv_free(network->route_domains);
strv_free(network->bind_carrier); strv_free(network->bind_carrier);
strv_free(network->router_search_domains); strv_free(network->router_search_domains);
free(network->router_dns);
netdev_unref(network->bridge); netdev_unref(network->bridge);
netdev_unref(network->bond); netdev_unref(network->bond);
netdev_unref(network->vrf); netdev_unref(network->vrf);
HASHMAP_FOREACH(netdev, network->stacked_netdevs, i) { hashmap_free_with_destructor(network->stacked_netdevs, netdev_unref);
hashmap_remove(network->stacked_netdevs, netdev->ifname);
netdev_unref(netdev);
}
hashmap_free(network->stacked_netdevs);
while ((route = network->static_routes)) while ((route = network->static_routes))
route_free(route); route_free(route);

View File

@ -0,0 +1,2 @@
[IPv6PrefixDelegation]
DNS=::