From 33c97d0b5e9c9a135ad4fc2509ecd3612f8bab6a Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 22 Jan 2011 13:02:44 +0100 Subject: [PATCH] pci: Fix memory leak Signed-off-by: Stefan Weil Signed-off-by: Aurelien Jarno --- hw/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci.c b/hw/pci.c index 5e6e216..8b76cea 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1875,6 +1875,7 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom) if (size < 0) { error_report("%s: failed to find romfile \"%s\"", __FUNCTION__, pdev->romfile); + qemu_free(path); return -1; } if (size & (size - 1)) { -- 2.7.4