diff options
Diffstat (limited to 'tests/vhost-user-test.c')
-rw-r--r-- | tests/vhost-user-test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 9095af267e..b3cc045765 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -16,7 +16,7 @@ #include "qemu/option.h" #include "qemu/range.h" #include "qemu/sockets.h" -#include "sysemu/char.h" +#include "chardev/char-fe.h" #include "sysemu/sysemu.h" #include "libqos/libqos.h" #include "libqos/pci-pc.h" @@ -488,10 +488,8 @@ static inline void test_server_connect(TestServer *server) static gboolean _test_server_free(TestServer *server) { int i; - Chardev *chr = qemu_chr_fe_get_driver(&server->chr); - qemu_chr_fe_deinit(&server->chr); - object_unparent(OBJECT(chr)); + qemu_chr_fe_deinit(&server->chr, true); for (i = 0; i < server->fds_num; i++) { close(server->fds[i]); |