diff options
author | Tom Gundersen <teg@jklm.no> | 2013-11-18 11:54:09 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-11-19 14:39:19 +0100 |
commit | 0617ffabe86a6d366252477eafbe59a888b149d4 (patch) | |
tree | 9fa24943465d2ce0dbc6d6b306c677d14b092496 /src/network/networkd-manager.c | |
parent | bc9cdba5ddf78d0ecb5c64f55621bb2f474ea280 (diff) |
networkd: make sure Links and Networks are freed
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r-- | src/network/networkd-manager.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 5000674bd9..e376d38872 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -73,11 +73,21 @@ int manager_new(Manager **ret) { } void manager_free(Manager *m) { + Network *network; + Link *link; + udev_monitor_unref(m->udev_monitor); udev_unref(m->udev); sd_event_source_unref(m->udev_event_source); sd_event_unref(m->event); + + while ((network = m->networks)) + network_free(network); + + while ((link = hashmap_first(m->links))) + link_free(link); hashmap_free(m->links); + strv_free(m->network_dirs); sd_rtnl_unref(m->rtnl); |