summaryrefslogtreecommitdiff
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-27 17:38:05 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-27 17:38:05 +0200
commit2f5b4a774a656d1da1daed604d3f4c15417c1897 (patch)
tree8bcc564ae01c967ec38c9b29ccb67846124f2c4b /src/network/networkd-manager.c
parentad9437836f5d94b44d40ee702a0455a637c30322 (diff)
networkd: make sure we remove udev fd from epoll *before* closing it
Otherwise we'll try to remove an invalid fd from epoll all the time.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 46bcdff1cf..c8f6d05a9b 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -477,13 +477,13 @@ void manager_free(Manager *m) {
free(m->state_file);
+ sd_event_source_unref(m->udev_event_source);
udev_monitor_unref(m->udev_monitor);
udev_unref(m->udev);
+
sd_bus_unref(m->bus);
sd_bus_slot_unref(m->prepare_for_sleep_slot);
- sd_event_source_unref(m->udev_event_source);
sd_event_source_unref(m->bus_retry_event_source);
- sd_event_unref(m->event);
while ((link = hashmap_first(m->links)))
link_unref(link);
@@ -502,6 +502,7 @@ void manager_free(Manager *m) {
address_pool_free(pool);
sd_netlink_unref(m->rtnl);
+ sd_event_unref(m->event);
free(m);
}