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 <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Paolo Bonzini 2019-10-01 15:36:22 +02:00
parent f5f72e8f31
commit 100781a8cd

View File

@ -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;
}