diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-04 19:59:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-04 19:59:05 +0200 |
commit | f0e1546763304aedc90e91d70dab9eeb7c966cf8 (patch) | |
tree | bc68edc3cd9455801ef895263a42f40ed6a102b6 /src/resolve/resolved-manager.c | |
parent | edc501d4674dadc304d45a7e1c5b69e207eb8cd4 (diff) |
resolved: fix order in which we destroy manager resources
Diffstat (limited to 'src/resolve/resolved-manager.c')
-rw-r--r-- | src/resolve/resolved-manager.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index 5061d39c46..db346cc0e5 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -524,14 +524,11 @@ Manager *manager_free(Manager *m) { if (!m) return NULL; - while (m->dns_queries) - dns_query_free(m->dns_queries); - - hashmap_free(m->dns_transactions); - while ((l = hashmap_first(m->links))) link_free(l); - hashmap_free(m->links); + + while (m->dns_queries) + dns_query_free(m->dns_queries); dns_scope_free(m->unicast_scope); @@ -540,6 +537,9 @@ Manager *manager_free(Manager *m) { while (m->fallback_dns_servers) dns_server_free(m->fallback_dns_servers); + hashmap_free(m->links); + hashmap_free(m->dns_transactions); + sd_event_source_unref(m->network_event_source); sd_network_monitor_unref(m->network_monitor); |