aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-01-24 19:00:47 +0900
committerMichael S. Tsirkin <mst@redhat.com>2011-01-24 15:40:37 +0200
commitbe7052c2a8f667f1dc42b06afcebb964ee0b03ff (patch)
tree3b1ec2077adf7c20ff0e3631c2af703f87585451 /hw
parente10990c3f0c39e92ab5f74004b89a24fcc36fa14 (diff)
downloadqemu-be7052c2a8f667f1dc42b06afcebb964ee0b03ff.zip
qemu-be7052c2a8f667f1dc42b06afcebb964ee0b03ff.tar.gz
qemu-be7052c2a8f667f1dc42b06afcebb964ee0b03ff.tar.bz2
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci.c b/hw/pci.c
index b8f5385..044c4bd 100644
--- a/hw/pci.c
+++ b/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;
}