diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-10-01 15:36:22 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-10-04 18:49:16 +0200 |
commit | 100781a8cd61927d8442bd0b02dfc10c5bb89bcb (patch) | |
tree | 23ce24f00eddfeb7f142254c6020222374a45ac3 /hw | |
parent | f5f72e8f31f22ba5ee43db5cb9481206fc661f76 (diff) | |
download | qemu-100781a8cd61927d8442bd0b02dfc10c5bb89bcb.zip qemu-100781a8cd61927d8442bd0b02dfc10c5bb89bcb.tar.gz qemu-100781a8cd61927d8442bd0b02dfc10c5bb89bcb.tar.bz2 |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/microblaze/boot.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index bade4d2..d1d7dfb 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; } |