From a75bf146503a94fb900e0dfa0529bd5d1be9fec5 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Thu, 13 Dec 2012 15:54:43 +0530 Subject: [PATCH] virtio-serial: delete timer if active during exit The post_load timer was being freed, but not deleted. This could cause problems when the timer is armed, but the device is hot-unplugged before the callback is executed. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 09d46593e2..fc0166ca7f 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -1038,6 +1038,7 @@ void virtio_serial_exit(VirtIODevice *vdev) g_free(vser->ports_map); if (vser->post_load) { g_free(vser->post_load->connected); + qemu_del_timer(vser->post_load->timer); qemu_free_timer(vser->post_load->timer); g_free(vser->post_load); } -- GitLab