Home
last modified time | relevance | path

Searched hist:"53 b95da1" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/timer/
H A Dstm32f2xx_timer.c53b95da1 Fri Feb 07 08:04:28 CST 2020 Pan Nengyuan <pannengyuan@huawei.com> stm32f2xx_timer: delay timer_new to avoid memleaks

There is a memory leak when we call 'device_list_properties' with typename = stm32f2xx_timer. It's easy to reproduce as follow:

virsh qemu-monitor-command vm1 --pretty '{"execute": "device-list-properties", "arguments": {"typename": "stm32f2xx_timer"}}'

This patch delay timer_new to fix this memleaks.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200205070659.22488-3-pannengyuan@huawei.com
Cc: Alistair Francis <alistair@alistair23.me>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>