summaryrefslogtreecommitdiff
path: root/src/network/networkd-veth.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-01 19:41:45 +0200
committerTom Gundersen <teg@jklm.no>2014-07-01 20:33:30 +0200
commit8900367cd26c148200b4788cd9ae05995ceeb74c (patch)
tree280f5263dd0b96235258fb2560a833e59d098dae /src/network/networkd-veth.c
parenteafbd4d7cebe50b55324514cc7e95f003dd8ab47 (diff)
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.
Diffstat (limited to 'src/network/networkd-veth.c')
-rw-r--r--src/network/networkd-veth.c2
1 files changed, 2 insertions, 0 deletions
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));