pci: Fix memory leak
PATCH 1/3 pci: Fix memory leak
Signed-off-by Stefan Weil <[email protected]>
--- hw/pci.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
hw/pci.c +1 -0
@@ -1877,6 +1877,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 )) {
Signature · 1 line
1.7.2.3
PATCH 2/3 ppc405: Fix memory leak
Signed-off-by Stefan Weil <[email protected]>
--- hw/ppc405_boards.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
hw/ppc405_boards.c +1 -0
@@ -560,6 +560,7 @@ static void taihu_405ep_init(ram_addr_t ram_size, filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , bios_name);if (filename) { bios_size =load_image (filename,qemu_get_ram_ptr (bios_offset)); +qemu_free (filename); }else { bios_size =-1 ; }
Signature · 1 line
1.7.2.3
Re: [Qemu-devel] [PATCH 2/3] ppc405: Fix memory leak
Am 22.01.2011 um 13:02 schrieb Stefan Weil:
Quoted 1 line
Signed-off-by Stefan Weil <[email protected]>
Acked-by Andreas Färber <[email protected]>
Quoted 16 lines
---
hw/ppc405_boards.c| 1 +1 files changed, 1 insertions(+), 0 deletions(-)hw/ppc405_boards.c +1
-0@@ -560,6 +560,7 @@ static void taihu_405ep_init(ram_addr_t ram_size, filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , bios_name);if (filename) { bios_size =load_image (filename,qemu_get_ram_ptr (bios_offset)); +qemu_free (filename); }else { bios_size =-1 ;
Quoted 1 line
}
Untested but matches the 405 reference board and New World / Old World / PReP then.
Andreas
PATCH 3/3 s390: Fix memory leak
In reply to Stefan WeilSigned-off-by Stefan Weil <[email protected]>
--- hw/s390-virtio.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
hw/s390-virtio.c +1 -0
@@ -204,6 +204,7 @@ static void s390_init(ram_addr_t ram_size, bios_filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , bios_name); bios_size =load_image (bios_filename,qemu_get_ram_ptr (ZIPL_LOAD_ADDR )); +qemu_free (bios_filename);if ((long )bios_size <0 ) {hw_error ("could not load bootloader '%s'\n" , bios_name);
Signature · 1 line
1.7.2.3
Quoted 4 lines · Stefan Weil
Signed-off-by Stefan Weil <[email protected]>--- hw/pci.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Thanks all three patches applied.
Quoted 17 lines
hw/pci.c +1
-0@@ -1877,6 +1877,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 )) {Signature · 1 line
1.7.2.3
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net