From: Isaku Yamahata Date: Mon, 24 Jan 2011 10:00:47 +0000 (+0900) Subject: pci: memory leak of PCIDevice::rom_file X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~6537^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be7052c2a8f667f1dc42b06afcebb964ee0b03ff;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: Michael S. Tsirkin --- 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; }