Files
qemu-qemu-1/hw
Peter Maydell caa5d82570 hw/misc/riscv_cpc: Free CPU array in instance_finalize
The TYPE_RISCV_CPC device allocates an array in its instance_init,
but does not free this, leading to leaks like this from QOM/QMP
introspection:

Direct leak of 512 byte in 1 object allocated from:
    #0  in calloc
    #1  in g_malloc0
    #2  in riscv_cpc_init /home/pm215/qemu/build/san/../../hw/misc/riscv_cpc.c:175:15
    #3  in object_initialize_with_type /home/pm215/qemu/build/san/../../qom/object.c:570:5
    #4  in object_new_with_type /home/pm215/qemu/build/san/../../qom/object.c:774:5
    #5  in qmp_device_list_properties /home/pm215/qemu/build/san/../../qom/qom-qmp-cmds.c:206:11
    #6  in qdev_device_help /home/pm215/qemu/build/san/../../system/qdev-monitor.c:313:17
    #7  in hmp_device_add /home/pm215/qemu/build/san/../../system/qdev-monitor.c:1005:9

Free the array in instance_finalize.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260309095328.1406779-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2026-03-09 16:45:25 +01:00
..
2026-02-23 00:17:34 +01:00
2026-03-09 16:45:24 +01:00
2025-12-27 10:11:08 +01:00
2026-03-08 23:08:41 +01:00
2025-12-27 10:11:08 +01:00
2025-12-27 10:11:08 +01:00
2026-03-08 23:08:41 +01:00
2026-02-27 14:22:07 +01:00
2026-03-08 23:08:41 +01:00
2026-03-08 23:08:41 +01:00
2026-03-02 11:15:16 +05:30
2025-12-27 10:11:08 +01:00
2025-12-27 10:11:08 +01:00
2026-03-08 23:08:41 +01:00
2025-12-27 10:11:08 +01:00
2026-03-08 23:08:41 +01:00