summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--net/vhost-user.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 36f32a2d84..c23927c912 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -151,6 +151,10 @@ static void vhost_user_cleanup(NetClientState *nc)
         s->vhost_net = NULL;
     }
     if (nc->queue_index == 0) {
+        if (s->watch) {
+            g_source_remove(s->watch);
+            s->watch = 0;
+        }
         qemu_chr_fe_deinit(&s->chr, true);
     }