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:
commit
a357f4a6e9
@ -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);
|
||||||
|
2
test/fuzz/fuzz-network-parser/oss-fuzz-11345
Normal file
2
test/fuzz/fuzz-network-parser/oss-fuzz-11345
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[IPv6PrefixDelegation]
|
||||||
|
DNS=::
|
Loading…
Reference in New Issue
Block a user