From: Anthony Liguori Date: Thu, 15 Mar 2012 16:29:56 +0000 (-0500) Subject: pci: fix double free of romfile property X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~727 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5ab1404d014cefe22e9a10fca00d0acf4fe412b;p=sdk%2Femulator%2Fqemu.git pci: fix double free of romfile property 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 Signed-off-by: Anthony Liguori --- diff --git a/hw/pci.c b/hw/pci.c index bf046bfcad..ed8ec99073 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; }