diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2025-08-21 16:43:58 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-09-02 17:57:05 +0200 |
commit | ac6b124180f7698084ef2a59282e8fa65a45f23b (patch) | |
tree | 7a1d7db4b85c5fd53ac1dde060a814b01a0d16f2 /scripts | |
parent | 3284d1c07cfd8d42aa27d1cf83d3e65fcd62e35e (diff) | |
download | qemu-ac6b124180f7698084ef2a59282e8fa65a45f23b.zip qemu-ac6b124180f7698084ef2a59282e8fa65a45f23b.tar.gz qemu-ac6b124180f7698084ef2a59282e8fa65a45f23b.tar.bz2 |
hw/char/max78000_uart: Destroy FIFO on deinit
In the max78000_uart we create a FIFO in the instance_init function,
but we don't destroy it on deinit, so ASAN reports a leak in the
device-introspect-test:
#0 0x561cc92d5de3 in malloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-asan/qemu-system-arm+0x21f1de3) (BuildId: 98fdf9fc85c3beaeca8eda0be8412f1e11b9c6ad)
#1 0x70cbf2afab09 in g_malloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62b09) (BuildId: 1eb6131419edb83b2178b682829a6913cf682d75)
#2 0x561ccc4c884d in fifo8_create /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-asan/../../util/fifo8.c:27:18
#3 0x561cc9744ec9 in max78000_uart_init /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-asan/../../hw/char/max78000_uart.c:241:5
Add an instance_finalize method to destroy the FIFO.
Cc: qemu-stable@nongnu.org
Fixes: d447e4b70295 ("MAX78000: UART Implementation")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250821154358.2417744-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions