提交 a75bf146 编写于 作者: A Amit Shah

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: NAmit Shah <amit.shah@redhat.com>
上级 bdb917bf
...@@ -1038,6 +1038,7 @@ void virtio_serial_exit(VirtIODevice *vdev) ...@@ -1038,6 +1038,7 @@ void virtio_serial_exit(VirtIODevice *vdev)
g_free(vser->ports_map); g_free(vser->ports_map);
if (vser->post_load) { if (vser->post_load) {
g_free(vser->post_load->connected); g_free(vser->post_load->connected);
qemu_del_timer(vser->post_load->timer);
qemu_free_timer(vser->post_load->timer); qemu_free_timer(vser->post_load->timer);
g_free(vser->post_load); g_free(vser->post_load);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册