#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"
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