qemu/hw/char
Chen Qun 8bbc394c55 hw/char/exynos4210_uart: Fix memleaks in exynos4210_uart_init
It's easy to reproduce as follow:
virsh qemu-monitor-command vm1 --pretty '{"execute": "device-list-properties",
"arguments":{"typename":"exynos4210.uart"}}'

ASAN shows memory leak stack:
  #1 0xfffd896d71cb in g_malloc0 (/lib64/libglib-2.0.so.0+0x571cb)
  #2 0xaaad270beee3 in timer_new_full /qemu/include/qemu/timer.h:530
  #3 0xaaad270beee3 in timer_new /qemu/include/qemu/timer.h:551
  #4 0xaaad270beee3 in timer_new_ns /qemu/include/qemu/timer.h:569
  #5 0xaaad270beee3 in exynos4210_uart_init /qemu/hw/char/exynos4210_uart.c:677
  #6 0xaaad275c8f4f in object_initialize_with_type /qemu/qom/object.c:516
  #7 0xaaad275c91bb in object_new_with_type /qemu/qom/object.c:684
  #8 0xaaad2755df2f in qmp_device_list_properties /qemu/qom/qom-qmp-cmds.c:152

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200213025603.149432-1-kuhn.chenqun@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13 14:14:55 +00:00
..
bcm2835_aux.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
cadence_uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
cmsdk-apb-uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
debugcon.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
digic-uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
escc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
etraxfs_ser.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
exynos4210_uart.c hw/char/exynos4210_uart: Fix memleaks in exynos4210_uart_init 2020-02-13 14:14:55 +00:00
grlib_apbuart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
imx_serial.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ipoctal232.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
Kconfig hw/char: Move multi-serial devices into separate file 2019-05-17 15:19:39 +02:00
lm32_juart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
lm32_uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
Makefile.objs hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
mcf_uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
milkymist-uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
nrf51_uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
omap_uart.c serial: start making SerialMM a sysbus device 2020-01-07 17:23:30 +04:00
parallel-isa.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
parallel.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
pl011.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
sclpconsole-lm.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
sclpconsole.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
serial-isa.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
serial-pci-multi.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
serial-pci.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
serial.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
sh_serial.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
spapr_vty.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
stm32f2xx_usart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
terminal3270.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
trace-events hw/char/exynos4210_uart: Add receive DMA support 2020-01-23 16:34:15 +00:00
virtio-console.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
virtio-serial-bus.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
xen_console.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xilinx_uartlite.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00