[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/8] microblaze: fix leak of fdevice tree blob

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/8] microblaze: fix leak of fdevice tree blob
Date: Tue, 1 Oct 2019 16:01:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 10/1/19 3:36 PM, Paolo Bonzini wrote:
The device tree blob returned by load_device_tree is malloced.
Free it before returning.

Signed-off-by: Paolo Bonzini <address@hidden>
  hw/microblaze/boot.c | 1 +
  1 file changed, 1 insertion(+)

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;

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]