diff options
author | Amit Shah <amit.shah@redhat.com> | 2012-12-13 15:54:43 +0530 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2012-12-13 16:01:26 +0530 |
commit | a75bf146503a94fb900e0dfa0529bd5d1be9fec5 (patch) | |
tree | 145d4ed58791176b417ebd341948937a72b23ddb /hw/virtio-serial-bus.c | |
parent | bdb917bf8ab187b662c612ee6fb87479c0b82490 (diff) | |
download | hqemu-a75bf146503a94fb900e0dfa0529bd5d1be9fec5.zip hqemu-a75bf146503a94fb900e0dfa0529bd5d1be9fec5.tar.gz |
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 <amit.shah@redhat.com>
Diffstat (limited to 'hw/virtio-serial-bus.c')
-rw-r--r-- | hw/virtio-serial-bus.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 09d4659..fc0166c 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); } |