diff options
Diffstat (limited to 'net/vhost-user.c')
-rw-r--r-- | net/vhost-user.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/vhost-user.c b/net/vhost-user.c index 00a0c1cbc5..a042ec6a34 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -12,7 +12,7 @@ #include "clients.h" #include "net/vhost_net.h" #include "net/vhost-user.h" -#include "sysemu/char.h" +#include "chardev/char-fe.h" #include "qemu/config-file.h" #include "qemu/error-report.h" #include "qmp-commands.h" @@ -151,10 +151,7 @@ static void vhost_user_cleanup(NetClientState *nc) s->vhost_net = NULL; } if (nc->queue_index == 0) { - Chardev *chr = qemu_chr_fe_get_driver(&s->chr); - - qemu_chr_fe_deinit(&s->chr); - object_unparent(OBJECT(chr)); + qemu_chr_fe_deinit(&s->chr, true); } qemu_purge_queued_packets(nc); |