peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0001-riscv-sifive_u-fix-a-memory-leak-in-soc_realize.patch

b98348
From bb8136df698bd565ee4f6c18d26c50dee320bfe4 Mon Sep 17 00:00:00 2001
b98348
From: Pan Nengyuan <pannengyuan@huawei.com>
b98348
Date: Tue, 10 Dec 2019 15:14:37 +0800
b98348
Subject: [PATCH 1/5] riscv/sifive_u: fix a memory leak in soc_realize()
b98348
MIME-Version: 1.0
b98348
Content-Type: text/plain; charset=UTF-8
b98348
Content-Transfer-Encoding: 8bit
b98348
b98348
Fix a minor memory leak in riscv_sifive_u_soc_realize()
b98348
b98348
Reported-by: Euler Robot <euler.robot@huawei.com>
b98348
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
b98348
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
b98348
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
b98348
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
b98348
---
b98348
 hw/riscv/sifive_u.c | 1 +
b98348
 1 file changed, 1 insertion(+)
b98348
b98348
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
b98348
index 0140e95732..0e12b3ccef 100644
b98348
--- a/hw/riscv/sifive_u.c
b98348
+++ b/hw/riscv/sifive_u.c
b98348
@@ -542,6 +542,7 @@ static void riscv_sifive_u_soc_realize(DeviceState *dev, Error **errp)
b98348
         SIFIVE_U_PLIC_CONTEXT_BASE,
b98348
         SIFIVE_U_PLIC_CONTEXT_STRIDE,
b98348
         memmap[SIFIVE_U_PLIC].size);
b98348
+    g_free(plic_hart_config);
b98348
     sifive_uart_create(system_memory, memmap[SIFIVE_U_UART0].base,
b98348
         serial_hd(0), qdev_get_gpio_in(DEVICE(s->plic), SIFIVE_U_UART0_IRQ));
b98348
     sifive_uart_create(system_memory, memmap[SIFIVE_U_UART1].base,
b98348
-- 
b98348
2.24.1
b98348