mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
When called on an unrealized pxb bus (e.g. from
qmp_qom_list_properties), bus->parent_dev is NULL. The pxb_bus_num()
callback dereferences it unconditionally. Check for this to avoid a
NULL dereference.
Fixes: 97b9cb066e ("hw/pci-bridge: Add acpi_uid property to TYPE_PXB_BUS")
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>