X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=spice-qemu-char.c;h=4d1c76e8a418fb6c45824567ec610e9fae105eec;hb=b9afaba891458d3e1f3f853a8cb6880498ed34e3;hp=adfa55b55c3e73024c61e081187b883ddb3df61b;hpb=e905587b752a700644235fbbf6af6d21f0632616;p=mirror_qemu.git diff --git a/spice-qemu-char.c b/spice-qemu-char.c index adfa55b55c..4d1c76e8a4 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "trace.h" +#include "trace-root.h" #include "ui/qemu-spice.h" #include "sysemu/char.h" #include "qemu/error-report.h" @@ -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