1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +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;
Prefix *prefix;
Address *address;
NetDev *netdev;
Route *route;
Iterator i;
if (!network)
return;
@ -369,17 +367,15 @@ void network_free(Network *network) {
strv_free(network->search_domains);
strv_free(network->route_domains);
strv_free(network->bind_carrier);
strv_free(network->router_search_domains);
free(network->router_dns);
netdev_unref(network->bridge);
netdev_unref(network->bond);
netdev_unref(network->vrf);
HASHMAP_FOREACH(netdev, network->stacked_netdevs, i) {
hashmap_remove(network->stacked_netdevs, netdev->ifname);
netdev_unref(netdev);
}
hashmap_free(network->stacked_netdevs);
hashmap_free_with_destructor(network->stacked_netdevs, netdev_unref);
while ((route = network->static_routes))
route_free(route);

View File

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