qemu/hw
Daniel Henrique Barboza 1a49762c07 hw/riscv/virt-acpi-build.c: fix leak in build_rhct()
The 'isa' char pointer isn't being freed after use.

Issue detected by Valgrind:

==38752== 128 bytes in 1 blocks are definitely lost in loss record 3,190 of 3,884
==38752==    at 0x484280F: malloc (vg_replace_malloc.c:442)
==38752==    by 0x5189619: g_malloc (gmem.c:130)
==38752==    by 0x51A5BF2: g_strconcat (gstrfuncs.c:628)
==38752==    by 0x6C1E3E: riscv_isa_string_ext (cpu.c:2321)
==38752==    by 0x6C1E3E: riscv_isa_string (cpu.c:2343)
==38752==    by 0x6BD2EA: build_rhct (virt-acpi-build.c:232)
==38752==    by 0x6BD2EA: virt_acpi_build (virt-acpi-build.c:556)
==38752==    by 0x6BDC86: virt_acpi_setup (virt-acpi-build.c:662)
==38752==    by 0x9C8DC6: notifier_list_notify (notify.c:39)
==38752==    by 0x4A595A: qdev_machine_creation_done (machine.c:1589)
==38752==    by 0x61E052: qemu_machine_creation_done (vl.c:2680)
==38752==    by 0x61E052: qmp_x_exit_preconfig.part.0 (vl.c:2709)
==38752==    by 0x6220C6: qmp_x_exit_preconfig (vl.c:2702)
==38752==    by 0x6220C6: qemu_init (vl.c:3758)
==38752==    by 0x425858: main (main.c:47)

Fixes: ebfd392893 ("hw/riscv/virt: virt-acpi-build.c: Add RHCT Table")
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240122221529.86562-2-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2024-02-09 20:43:14 +10:00
..
9pfs
acpi
adc
alpha hw/alpha/dp264: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
arm target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
audio hw/audio/sb16: Do not migrate qdev properties 2024-01-05 16:20:15 +01:00
avr
block hw/block/block.c: improve confusing blk_check_size_and_read_all() error 2024-01-30 16:19:00 -05:00
char hw/char/imx_serial: Implement receive FIFO and ageing timer 2024-01-26 11:34:21 +00:00
core hw/core: Remove transitional infrastructure from BusClass 2024-02-02 13:51:57 +00:00
cpu target/arm: Move GTimer definitions to new 'gtimer.h' header 2024-01-26 11:30:49 +00:00
cris hw/net/etraxfs-eth: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
cxl cxl: Clean up includes 2024-01-30 21:20:20 +03:00
display vga: sort-of implement word and double-word access modes 2024-01-18 10:43:14 +01:00
dma
fsi hw/fsi: Aspeed APB2OPB & On-chip peripheral bus 2024-02-01 08:33:18 +01:00
gpio
hppa hw/net/lasi_i82596: use qemu_create_nic_device() 2024-02-02 16:23:47 +00:00
hyperv hv-balloon: use get_min_alignment() to express 32 GiB alignment 2024-02-04 17:42:03 +01:00
i2c
i386 hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs 2024-02-02 16:23:47 +00:00
ide
input adb: Switch bus reset to 3-phase-reset 2024-02-02 13:51:57 +00:00
intc hw/intc/xics: Include missing 'cpu.h' header 2024-01-30 21:20:20 +03:00
ipack
ipmi
isa
loongarch hw/loongarch: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
m68k hw/m68k/q800: use qemu_find_nic_info() 2024-02-02 16:23:47 +00:00
mem memory-device: reintroduce memory region size check 2024-02-06 08:14:59 +01:00
microblaze hw/microblaze: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
mips hw/mips/jazz: use qemu_find_nic_info() 2024-02-02 16:23:47 +00:00
misc hw/misc/xlnx-versal-crl: Build it only once 2024-01-26 11:30:49 +00:00
net target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
nios2
nubus
nvme
nvram acpi: Clean up includes 2024-01-30 21:20:20 +03:00
openrisc hw/openrisc/openrisc_sim: use qemu_create_nic_device() 2024-02-02 16:23:47 +00:00
pci target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
pci-bridge
pci-host pci-host: designware: Limit value range of iATU viewport register 2024-02-02 13:51:58 +00:00
pcmcia
ppc target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules 2024-02-05 14:21:21 +01:00
rdma
remote Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
riscv hw/riscv/virt-acpi-build.c: fix leak in build_rhct() 2024-02-09 20:43:14 +10:00
rtc
rx
s390x target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
scsi hw/scsi/lsi53c895a: add missing decrement of reentrancy counter 2024-02-05 14:21:21 +01:00
sd
sensor
sh4 hw/sh4/r2d: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
smbios
sparc hw/sparc/sun4m: use qemu_find_nic_info() 2024-02-02 16:23:47 +00:00
sparc64 hw/sparc64/sun4u: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
ssi hw/ssi: Implement BCM2835 SPI Controller 2024-02-02 13:51:59 +00:00
timer hw/timer/hpet: Convert DPRINTF to trace events 2024-01-19 12:28:10 +01:00
tpm
tricore
ufs
usb
vfio vfio/pci: Clear MSI-X IRQ index always 2024-01-29 08:26:25 +01:00
virtio oslib-posix: initialize backend memory objects in parallel 2024-02-06 08:15:22 +01:00
watchdog
xen target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
xenpv hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs 2024-02-02 16:23:47 +00:00
xtensa hw/xtensa/xtfpga: use qemu_create_nic_device() 2024-02-02 16:23:47 +00:00
Kconfig hw/fsi: Introduce IBM's Local bus 2024-02-01 08:13:30 +01:00
meson.build hw/fsi: Introduce IBM's Local bus 2024-02-01 08:13:30 +01:00