summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonglei2014-07-26 06:45:33 +0200
committerAlexander Graf2014-09-08 12:50:47 +0200
commita21a7a701252717f05defee8a1a33d72c28fabb7 (patch)
treeb73184d83b682b706552a826c500fda7435e2d2e
parentPPC: mac99: Move NVRAM to page boundary when necessary (diff)
downloadqemu-a21a7a701252717f05defee8a1a33d72c28fabb7.tar.gz
qemu-a21a7a701252717f05defee8a1a33d72c28fabb7.tar.xz
qemu-a21a7a701252717f05defee8a1a33d72c28fabb7.zip
spapr: fix possible memory leak
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>
-rw-r--r--hw/ppc/spapr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 0adea311cc..522ee27045 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -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);
}