From 2ff9c28e2b72cd359a0c4e931412e355baee8e1e Mon Sep 17 00:00:00 2001 From: lizhengui Date: Wed, 9 Sep 2020 14:55:11 +0800 Subject: [PATCH] microblaze: fix leak of fdevice tree blob MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The device tree blob returned by load_device_tree is malloced. Free it before returning. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- hw/microblaze/boot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index a7af4c07..0fcc4e9d 100644 --- a/hw/microblaze/boot.c +++ b/hw/microblaze/boot.c @@ -99,6 +99,7 @@ static int microblaze_load_dtb(hwaddr addr, } cpu_physical_memory_write(addr, fdt, fdt_size); + g_free(fdt); return fdt_size; } -- 2.19.1