From 2f5b4a774a656d1da1daed604d3f4c15417c1897 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 27 Aug 2015 17:38:05 +0200 Subject: 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. --- src/network/networkd-manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/network') 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); } -- cgit v1.2.3-54-g00ecf