From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8DZ4-0000U6-36 for qemu-devel@nongnu.org; Thu, 15 Mar 2012 12:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8DZ2-0004zU-A4 for qemu-devel@nongnu.org; Thu, 15 Mar 2012 12:30:09 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:48443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8DZ2-0004sF-5m for qemu-devel@nongnu.org; Thu, 15 Mar 2012 12:30:08 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Mar 2012 12:29:59 -0400 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 0A2E938C807E for ; Thu, 15 Mar 2012 12:29:58 -0400 (EDT) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2FGTvlB268298 for ; Thu, 15 Mar 2012 12:29:57 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2FM0oYg012540 for ; Thu, 15 Mar 2012 18:00:50 -0400 From: Anthony Liguori Date: Thu, 15 Mar 2012 11:29:56 -0500 Message-Id: <1331828996-17164-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH] pci: fix double free of romfile property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Signed-off-by: Anthony Liguori --- 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