From: Gonglei <arei.gong...@huawei.com> When not assign a -dtb argument, the variable dtb_filename storage returned from qemu_find_file(), which should be freed after using.
Signed-off-by: Gonglei <arei.gong...@huawei.com> --- hw/microblaze/boot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index a2843cd..4c1e3a9 100644 --- a/hw/microblaze/boot.c +++ b/hw/microblaze/boot.c @@ -205,5 +205,7 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, kernel_cmdline, dtb_filename); } - + if (!dtb_arg) { + g_free(dtb_filename); + } } -- 1.7.12.4