diff options
author | Bernhard Beschow <shentey@gmail.com> | 2023-04-03 09:41:19 +0200 |
---|---|---|
committer | Anthony PERARD <anthony.perard@citrix.com> | 2023-06-07 15:07:10 +0100 |
commit | c0b59416c05fbf7a5fefee4b4757f7281e34ed02 (patch) | |
tree | 5618ad754c0d0986b70166b673730d38a1bd8ea9 /contrib/vhost-user-blk | |
parent | 27047bd26633d559b9630c57e922e4e78cb2ff1d (diff) | |
download | qemu-c0b59416c05fbf7a5fefee4b4757f7281e34ed02.zip qemu-c0b59416c05fbf7a5fefee4b4757f7281e34ed02.tar.gz qemu-c0b59416c05fbf7a5fefee4b4757f7281e34ed02.tar.bz2 |
hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()
When calling pci_bus_irqs() multiple times on the same object without calling
pci_bus_irqs_cleanup() in between PCIBus::irq_count[] is currently leaked.
Let's fix this because Xen will do just that in a few commits, and because
calling pci_bus_irqs_cleanup() in between seems fragile and cumbersome.
Note that pci_bus_irqs_cleanup() now has to NULL irq_count such that
pci_bus_irqs() doesn't do a double free.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
Message-Id: <20230403074124.3925-3-shentey@gmail.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'contrib/vhost-user-blk')
0 files changed, 0 insertions, 0 deletions