qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

hw/nios2: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>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200218091154.21696-2-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>

authored by

Chen Qun and committed by
Laurent Vivier
757ca9b8 b18ee6a2

+1
+1
hw/nios2/boot.c
··· 109 109 } 110 110 111 111 cpu_physical_memory_write(bi.fdt, fdt, fdt_size); 112 + g_free(fdt); 112 113 return fdt_size; 113 114 } 114 115