From 3dc2e7af5fc9d045416f8f6dc3f76799af7eb204 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 11 Aug 2019 09:11:20 +0900 Subject: [PATCH] network: add missing link_ref() --- src/network/networkd-link.c | 4 ++++ src/network/networkd-manager.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 6bcb078808..a813fca565 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2688,6 +2688,8 @@ int get_product_uuid_handler(sd_bus_message *m, void *userdata, sd_bus_error *re configure: while ((link = set_steal_first(manager->links_requesting_uuid))) { + link_unref(link); + r = link_configure(link); if (r < 0) link_enter_failed(link); @@ -2760,6 +2762,8 @@ static int link_configure_duid(Link *link) { r = set_put(m->duids_requesting_uuid, duid); if (r < 0) return log_oom(); + + link_ref(link); } return 0; diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 74266ff12a..fe7c388826 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -1818,6 +1818,8 @@ int manager_request_product_uuid(Manager *m, Link *link) { r = set_put(m->duids_requesting_uuid, duid); if (r < 0) return log_oom(); + + link_ref(link); } if (!m->bus || sd_bus_is_ready(m->bus) <= 0) {