* [Qemu-devel] [PATCH] pci: fix double free of romfile property
@ 2012-03-15 16:29 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2012-03-15 16:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Michael Tsirkin
The qdev property release function frees any string properties. This was
resulting in a double free during hot unplug.
It manifests in network devices because block devices have a NULL romfile
property by default.
Cc: Michael Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
hw/pci.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index bf046bf..ed8ec99 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -841,7 +841,6 @@ static int pci_unregister_device(DeviceState *dev)
pci_unregister_io_regions(pci_dev);
pci_del_option_rom(pci_dev);
- g_free(pci_dev->romfile);
do_pci_unregister_device(pci_dev);
return 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-15 16:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 16:29 [Qemu-devel] [PATCH] pci: fix double free of romfile property Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).