From: Paolo Bonzini Date: Tue, 1 Oct 2019 13:36:22 +0000 (+0200) Subject: microblaze: fix leak of fdevice tree blob X-Git-Tag: v4.2.0-rc0~71^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=100781a8cd61927d8442bd0b02dfc10c5bb89bcb;p=thirdparty%2Fqemu.git microblaze: fix leak of fdevice tree blob 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é --- diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index bade4d22c00..d1d7dfbbb9a 100644 --- a/hw/microblaze/boot.c +++ b/hw/microblaze/boot.c @@ -100,6 +100,7 @@ static int microblaze_load_dtb(hwaddr addr, } cpu_physical_memory_write(addr, fdt, fdt_size); + g_free(fdt); return fdt_size; }