hw/char/sifive_uart: Free fifo on unrealize
authorAlistair Francis <alistair23@gmail.com>
Mon, 3 Mar 2025 02:31:20 +0000 (12:31 +1000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 4 Mar 2025 13:45:34 +0000 (14:45 +0100)
commit7fc96bc4fca0cd8f1733235e987fe8ccf4517203
tree6c7c9ff336e3ddcbd82b116b40ce349cbb89f4d8
parent543671d9907f7604b83fa9e76cdb04fa9fab9cdc
hw/char/sifive_uart: Free fifo on unrealize

We previously allocate the fifo on reset and never free it, which means
we are leaking memory.

Instead let's allocate on realize and free on unrealize.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Tested-by: Clément Chigot <chigot@adacore.com>
Message-ID: <20250303023120.157221-1-alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/char/sifive_uart.c