diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index 557e459191..a48d5dedf8 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -144,7 +144,7 @@ static int get_virtfn_info(sd_device *pcidev, sd_device **ret_physfn_pcidev, cha if (!suffix) return -ENOMEM; - *ret_physfn_pcidev = sd_device_ref(child); + *ret_physfn_pcidev = sd_device_ref(physfn_pcidev); *ret_suffix = suffix; return 0; }