From bdf4c4ec53f293ea1baa7ce7c31fe0301887b513 Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Mon, 6 Mar 2017 11:29:31 +0800 Subject: virtio-serial-bus: Delete timer from list before free it Signed-off-by: zhanghailiang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini Reviewed-by: Amit Shah --- hw/char/virtio-serial-bus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/char') diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index d544cd91c0..d797a6796e 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -724,6 +724,7 @@ static void virtio_serial_post_load_timer_cb(void *opaque) } } g_free(s->post_load->connected); + timer_del(s->post_load->timer); timer_free(s->post_load->timer); g_free(s->post_load); s->post_load = NULL; -- cgit v1.2.3