X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=spice-qemu-char.c;h=4d1c76e8a418fb6c45824567ec610e9fae105eec;hb=b9afaba891458d3e1f3f853a8cb6880498ed34e3;hp=6f46f46b255113ad81d9518baf27f74d2dcaf5b8;hpb=5b66d7ae89411c01657ebfe76b9a8be346a4b1be;p=mirror_qemu.git diff --git a/spice-qemu-char.c b/spice-qemu-char.c index 6f46f46b25..4d1c76e8a4 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -215,7 +215,10 @@ static void char_spice_finalize(Object *obj) SpiceChardev *s = SPICE_CHARDEV(obj); vmc_unregister_interface(s); - QLIST_REMOVE(s, next); + + if (s->next.le_prev) { + QLIST_REMOVE(s, next); + } g_free((char *)s->sin.subtype); #if SPICE_SERVER_VERSION >= 0x000c02