diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-03-05 23:51:35 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2019-03-08 08:00:19 +0100 |
commit | 5411f3d0a25fc15cc0d42d985e5fdeddd51c0606 (patch) | |
tree | c8fbf501c090d3201d154b43cb18a0b286df00e0 /tests/vhost-user-test.c | |
parent | 13ee9e30c8855a8b8d62b05992cfc65fc57a8df5 (diff) | |
download | qemu-5411f3d0a25fc15cc0d42d985e5fdeddd51c0606.zip qemu-5411f3d0a25fc15cc0d42d985e5fdeddd51c0606.tar.gz qemu-5411f3d0a25fc15cc0d42d985e5fdeddd51c0606.tar.bz2 |
vhost-user-test: fix leaks
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Fixes: ae31fb54914 and 4d3f50eb489
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/vhost-user-test.c')
-rw-r--r-- | tests/vhost-user-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 83ea15f..14a1e2f 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); } |