summaryrefslogtreecommitdiffstats
path: root/hw/char
diff options
context:
space:
mode:
authorzhanghailiang2017-03-06 04:29:31 +0100
committerMichael S. Tsirkin2017-03-16 00:46:42 +0100
commitbdf4c4ec53f293ea1baa7ce7c31fe0301887b513 (patch)
tree9d3c5e4fe8dc8c855d67d09d51b415d9030e826f /hw/char
parenthw/virtio: fix Power Management Control Register for PCI Express virtio devices (diff)
downloadqemu-bdf4c4ec53f293ea1baa7ce7c31fe0301887b513.tar.gz
qemu-bdf4c4ec53f293ea1baa7ce7c31fe0301887b513.tar.xz
qemu-bdf4c4ec53f293ea1baa7ce7c31fe0301887b513.zip
virtio-serial-bus: Delete timer from list before free it
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Amit Shah <amit@kernel.org>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/virtio-serial-bus.c1
1 files changed, 1 insertions, 0 deletions
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;