diff options
author | Pan Nengyuan <pannengyuan@huawei.com> | 2020-02-07 14:04:28 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-07 14:04:28 +0000 |
commit | 53b95da1607072bc4727cbdb48a83e4befe282b4 (patch) | |
tree | b0d342fcb8d6b90bc3bd0ea7199c281484ddbbbf /tpm.c | |
parent | f3a508eb4e5b486f0d6e8a16dbd8ff4b9dafcd72 (diff) |
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>
Diffstat (limited to 'tpm.c')
0 files changed, 0 insertions, 0 deletions