From 56ba90c2df61d3ef04a599af43007434f77bef62 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 4 Nov 2018 01:59:46 +0900 Subject: network: use destroy callback to unref netdev attached to event source --- src/network/netdev/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network/netdev/netdev.c') diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c index 06709679a0..52b40dd68e 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -155,7 +155,7 @@ static NetDev *netdev_free(NetDev *netdev) { DEFINE_TRIVIAL_REF_UNREF_FUNC(NetDev, netdev, netdev_free); -void netdev_netlink_destroy_callback(void *userdata) { +void netdev_destroy_callback(void *userdata) { NetDev *netdev = userdata; assert(userdata); @@ -550,7 +550,7 @@ static int netdev_create(NetDev *netdev, Link *link, link_ref(link); } else { r = sd_netlink_call_async(netdev->manager->rtnl, NULL, m, netdev_create_handler, - netdev_netlink_destroy_callback, netdev, 0, __func__); + netdev_destroy_callback, netdev, 0, __func__); if (r < 0) return log_netdev_error_errno(netdev, r, "Could not send rtnetlink message: %m"); -- cgit v1.2.3