diff options
Diffstat (limited to 'src/network/networkd-netdev.c')
-rw-r--r-- | src/network/networkd-netdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c index c80e943871..0861ff3cc1 100644 --- a/src/network/networkd-netdev.c +++ b/src/network/networkd-netdev.c @@ -184,6 +184,8 @@ static int netdev_enslave_ready(NetDev *netdev, Link* link, sd_rtnl_message_hand return r; } + link_ref(link); + log_debug_netdev(netdev, "enslaving link '%s'", link->ifname); return 0; @@ -393,6 +395,7 @@ int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callbac cb->callback = callback; cb->link = link; + link_ref(link); LIST_PREPEND(callbacks, netdev->callbacks, cb); } @@ -678,8 +681,6 @@ static int netdev_load_one(Manager *manager, const char *filename) { if (r < 0) return r; - netdev_ref(netdev); - break; case NETDEV_KIND_BRIDGE: case NETDEV_KIND_BOND: |