pci: Fix memory leak

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Stefan Weil 2011-01-22 13:02:44 +01:00 committed by Aurelien Jarno
parent 3299369856
commit 386bbf4572
1 changed files with 1 additions and 0 deletions

View File

@ -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)) {