From: Amit Shah Date: Thu, 13 Dec 2012 10:24:43 +0000 (+0530) Subject: virtio-serial: delete timer if active during exit X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a75bf146503a94fb900e0dfa0529bd5d1be9fec5;p=qemu.git 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 --- 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); }