From 5411f3d0a25fc15cc0d42d985e5fdeddd51c0606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 5 Mar 2019 23:51:35 +0100 Subject: vhost-user-test: fix leaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Fixes: ae31fb54914 and 4d3f50eb489 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/vhost-user-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 83ea15f37e..14a1e2fbac 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -588,6 +588,7 @@ static void test_server_free(TestServer *server) g_test_message("unable to rmdir: path (%s): %s", server->tmpfs, strerror(errno)); } + g_free(server->tmpfs); qemu_chr_fe_deinit(&server->chr, true); @@ -605,6 +606,8 @@ static void test_server_free(TestServer *server) g_main_loop_unref(server->loop); g_main_context_unref(server->context); + g_cond_clear(&server->data_cond); + g_mutex_clear(&server->data_mutex); g_free(server); } -- cgit v1.2.3