aboutsummaryrefslogtreecommitdiff
path: root/tests/vhost-user-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vhost-user-test.c')
-rw-r--r--tests/vhost-user-test.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 4ca11ae28d..b3cc045765 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -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]);