summaryrefslogtreecommitdiff
path: root/hw/xen/xen_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xen/xen_platform.c')
-rw-r--r--hw/xen/xen_platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xen/xen_platform.c b/hw/xen/xen_platform.c
index 79bf0b33d3..70875e4122 100644
--- a/hw/xen/xen_platform.c
+++ b/hw/xen/xen_platform.c
@@ -95,7 +95,7 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void *o)
if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
PCI_CLASS_NETWORK_ETHERNET
&& strcmp(d->name, "xen-pci-passthrough") != 0) {
- qdev_free(DEVICE(d));
+ object_unparent(OBJECT(d));
}
}