]> git.proxmox.com Git - mirror_qemu.git/blobdiff - spice-qemu-char.c
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging
[mirror_qemu.git] / spice-qemu-char.c
index 6f46f46b255113ad81d9518baf27f74d2dcaf5b8..4d1c76e8a418fb6c45824567ec610e9fae105eec 100644 (file)
@@ -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