]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
spapr: fix possible memory leak
authorGonglei <arei.gonglei@huawei.com>
Sat, 26 Jul 2014 04:45:33 +0000 (12:45 +0800)
committerAlexander Graf <agraf@suse.de>
Mon, 8 Sep 2014 10:50:47 +0000 (12:50 +0200)
get_boot_devices_list() will malloc memory, spapr_finalize_fdt
doesn't free it.

Signed-off-by: Chenliang <chenliang88@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr.c

index 0adea311ccb333e6fdfd62bc6124a085936db0d7..522ee2704546ebafb36ceba1e80f83f4c9433a5a 100644 (file)
@@ -783,6 +783,7 @@ static void spapr_finalize_fdt(sPAPREnvironment *spapr,
 
     cpu_physical_memory_write(fdt_addr, fdt, fdt_totalsize(fdt));
 
+    g_free(bootlist);
     g_free(fdt);
 }