From 8900367cd26c148200b4788cd9ae05995ceeb74c Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 1 Jul 2014 19:41:45 +0200 Subject: networkd: netdev - take ref when creating netdevs We were doing this correctly for when the callback takes the Link object, but must also do it for the cases it takes the NetDev object. --- src/network/networkd-veth.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/network/networkd-veth.c') diff --git a/src/network/networkd-veth.c b/src/network/networkd-veth.c index 3584981cbc..3eac90ba90 100644 --- a/src/network/networkd-veth.c +++ b/src/network/networkd-veth.c @@ -145,6 +145,8 @@ int netdev_create_veth(NetDev *netdev, sd_rtnl_message_handler_t callback) { return r; } + netdev_ref(netdev); + log_debug_netdev(netdev, "Creating veth netdev: %s", netdev_kind_to_string(netdev->kind)); -- cgit v1.2.3-54-g00ecf