]> Git Repo - qemu.git/commitdiff
riscv/sifive_u: fix a memory leak in soc_realize()
authorPan Nengyuan <[email protected]>
Tue, 10 Dec 2019 07:14:37 +0000 (15:14 +0800)
committerPalmer Dabbelt <[email protected]>
Thu, 16 Jan 2020 18:02:40 +0000 (10:02 -0800)
Fix a minor memory leak in riscv_sifive_u_soc_realize()

Reported-by: Euler Robot <[email protected]>
Signed-off-by: Pan Nengyuan <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
hw/riscv/sifive_u.c

index 0140e95732af6c4310af71e6f4979fca35f8db85..0e12b3ccef54405774ea69183e6ca630057cab8f 100644 (file)
@@ -542,6 +542,7 @@ static void riscv_sifive_u_soc_realize(DeviceState *dev, Error **errp)
         SIFIVE_U_PLIC_CONTEXT_BASE,
         SIFIVE_U_PLIC_CONTEXT_STRIDE,
         memmap[SIFIVE_U_PLIC].size);
+    g_free(plic_hart_config);
     sifive_uart_create(system_memory, memmap[SIFIVE_U_UART0].base,
         serial_hd(0), qdev_get_gpio_in(DEVICE(s->plic), SIFIVE_U_UART0_IRQ));
     sifive_uart_create(system_memory, memmap[SIFIVE_U_UART1].base,
This page took 0.022298 seconds and 4 git commands to generate.