]> git.proxmox.com Git - qemu.git/commitdiff
pci: Fix memory leak
authorStefan Weil <weil@mail.berlios.de>
Sat, 22 Jan 2011 12:02:44 +0000 (13:02 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 20 Feb 2011 17:23:00 +0000 (18:23 +0100)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/pci.c

index 5e6e216487c37bd397d03e5f790c7b836fa3e58c..8b76cea91487a5a347f2b2620c341e7d6b76cc3b 100644 (file)
--- 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)) {