summary refs log tree commit diff stats
path: root/chardev/spice.c
diff options
context:
space:
mode:
Diffstat (limited to 'chardev/spice.c')
-rw-r--r--chardev/spice.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/chardev/spice.c b/chardev/spice.c
index 241e2b7770..bf7ea1e294 100644
--- a/chardev/spice.c
+++ b/chardev/spice.c
@@ -216,9 +216,7 @@ static void char_spice_finalize(Object *obj)
 
     vmc_unregister_interface(s);
 
-    if (s->next.le_prev) {
-        QLIST_REMOVE(s, next);
-    }
+    QLIST_SAFE_REMOVE(s, next);
 
     g_free((char *)s->sin.subtype);
     g_free((char *)s->sin.portname);