mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 21:33:40 +08:00
hw/ppc/virtex_ml507:fix leak of fdevice tree blob
The device tree blob returned by load_device_tree is malloced. We should free it after cpu_physical_memory_write(). Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com> Message-Id: <20200218091154.21696-3-kuhn.chenqun@huawei.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
ab8584349c
commit
438bafcac5
@ -188,6 +188,7 @@ static int xilinx_load_device_tree(hwaddr addr,
|
||||
if (r < 0)
|
||||
fprintf(stderr, "couldn't set /chosen/bootargs\n");
|
||||
cpu_physical_memory_write(addr, fdt, fdt_size);
|
||||
g_free(fdt);
|
||||
return fdt_size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user