mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
qdev: Drop misleading qbus_free() function
Same reasoning as commit 02a5c4c974
("qdev: Drop misleading qdev_free() function"). The qbus_free()
function removes the child from the namespace and decrements the
reference count. It does not, however, guarantee to free the child
since the refcount may still be held.
Just call object_unparent() directly.
Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
f54c19cacb
commit
6780a22cc7
3 changed files with 2 additions and 9 deletions
|
@ -391,7 +391,7 @@ void pci_bridge_exitfn(PCIDevice *pci_dev)
|
|||
pci_bridge_region_cleanup(s, s->windows);
|
||||
memory_region_destroy(&s->address_space_mem);
|
||||
memory_region_destroy(&s->address_space_io);
|
||||
/* qbus_free() is called automatically during device deletion */
|
||||
/* object_unparent() is called automatically during device deletion */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue