diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-23 13:08:33 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2024-07-24 16:14:36 +0300 |
commit | 9d0076b4a1a49a125ca9567cd4641d07b0447573 (patch) | |
tree | 7f815f286a8caebc385a84cf09337728fcf0a38f /target | |
parent | 437c556037ac9101bfcb6fbbabddeca7e3a93bf1 (diff) |
hw/intc/loongson_ipi: Fix resource leak
Once initialised, QOM objects can be realized and
unrealized multiple times before being finalized.
Resources allocated in REALIZE must be deallocated
in an equivalent UNREALIZE handler.
Free the CPU array in loongson_ipi_unrealize()
instead of loongson_ipi_finalize().
Cc: qemu-stable@nongnu.org
Fixes: 5e90b8db382 ("hw/loongarch: Set iocsr address space per-board rather than percpu")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20240723111405.14208-3-philmd@linaro.org>
(cherry picked from commit 0c2086bc7360565dfb9933181dafaefe2c94cddf)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: rename loongson back to longarch for 9.0 due to lack of
v9.0.0-582-gb4a12dfc2132 "hw/intc/loongarch_ipi: Rename as loongson_ipi")
Diffstat (limited to 'target')
0 files changed, 0 insertions, 0 deletions