projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e10990c
)
pci: memory leak of PCIDevice::rom_file
author
Isaku Yamahata
<yamahata@valinux.co.jp>
Mon, 24 Jan 2011 10:00:47 +0000
(19:00 +0900)
committer
Michael S. Tsirkin
<mst@redhat.com>
Mon, 24 Jan 2011 13:40:37 +0000
(15:40 +0200)
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>
hw/pci.c
patch
|
blob
|
history
diff --git
a/hw/pci.c
b/hw/pci.c
index b8f5385170af3fd688087257630bd01b620ef3e8..044c4bde45b776f12bc7298e404e4c1d88f02146 100644
(file)
--- 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;
}