mirror of
https://github.com/systemd/systemd.git
synced 2025-01-27 18:04:05 +03:00
networkd: fix a couple of memory leaks
This commit is contained in:
parent
c3ebdce39a
commit
79e16ce3bf
@ -178,6 +178,12 @@ sd_rtnl *sd_rtnl_unref(sd_rtnl *rtnl) {
|
||||
}
|
||||
|
||||
safe_close(rtnl->fd);
|
||||
|
||||
sd_event_source_unref(rtnl->io_event_source);
|
||||
sd_event_source_unref(rtnl->time_event_source);
|
||||
sd_event_source_unref(rtnl->exit_event_source);
|
||||
sd_event_unref(rtnl->event);
|
||||
|
||||
free(rtnl);
|
||||
|
||||
return NULL;
|
||||
|
@ -67,6 +67,11 @@ void netdev_free(NetDev *netdev) {
|
||||
free(netdev->description);
|
||||
free(netdev->name);
|
||||
|
||||
condition_free_list(netdev->match_host);
|
||||
condition_free_list(netdev->match_virt);
|
||||
condition_free_list(netdev->match_kernel);
|
||||
condition_free_list(netdev->match_arch);
|
||||
|
||||
free(netdev);
|
||||
}
|
||||
|
||||
|
@ -176,6 +176,11 @@ void network_free(Network *network) {
|
||||
if (network->manager && network->manager->networks)
|
||||
LIST_REMOVE(networks, network->manager->networks, network);
|
||||
|
||||
condition_free_list(network->match_host);
|
||||
condition_free_list(network->match_virt);
|
||||
condition_free_list(network->match_kernel);
|
||||
condition_free_list(network->match_arch);
|
||||
|
||||
free(network);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user