summaryrefslogtreecommitdiff
path: root/net/vhost-user.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/vhost-user.c')
-rw-r--r--net/vhost-user.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 357b500d82..140a4e0bde 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -150,10 +150,8 @@ static void vhost_user_cleanup(NetClientState *nc)
g_free(s->vhost_net);
s->vhost_net = NULL;
}
- if (nc->queue_index == 0 && s->chr.chr) {
- qemu_chr_fe_set_handlers(&s->chr, NULL, NULL, NULL, NULL, NULL);
- qemu_chr_fe_release(s->chr.chr);
- s->chr.chr = NULL;
+ if (nc->queue_index == 0) {
+ qemu_chr_fe_deinit(&s->chr);
}
qemu_purge_queued_packets(nc);
@@ -297,8 +295,6 @@ static CharDriverState *net_vhost_claim_chardev(
return NULL;
}
- qemu_chr_fe_claim_no_fail(chr);
-
return chr;
}