mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
pci: memory leak of PCIDevice::rom_file
PCIDevice::rom_file is leaked. PCIDevice::rom_file is allocated in pci_qdev_init(), but not freed anywhere. free it in qemu_unregister_device(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
e10990c3f0
commit
be7052c2a8
1 changed files with 1 additions and 0 deletions
1
hw/pci.c
1
hw/pci.c
|
@ -833,6 +833,7 @@ static int pci_unregister_device(DeviceState *dev)
|
|||
|
||||
pci_unregister_io_regions(pci_dev);
|
||||
pci_del_option_rom(pci_dev);
|
||||
qemu_free(pci_dev->romfile);
|
||||
do_pci_unregister_device(pci_dev);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue