vhost-user-test: fix leaks
PATCH 1/1 vhost-user-test: fix leaks
Spotted by ASAN.
Signed-off-by Marc-André Lureau <[email protected]>
--- tests/vhost-user-test.c | 3 +++ 1 file changed, 3 insertions(+)
tests/vhost-user-test.c +3 -0
@@ -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); }
Signature · 1 line
2.21.0.4.g36eb1cb9cf
Quoted 20 lines · Marc-André Lureau
Spotted by ASAN.
Signed-off-by Marc-André Lureau <[email protected]>--- tests/vhost-user-test.c | 3 +++ 1 file changed, 3 insertions(+)tests/vhost-user-test.c +1
-0@@ -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);
tests/vhost-user-test.c static void test_server_free(TestServer *server) · line 612
Quoted 7 lines
tests/vhost-user-test.c +2
-0@@ -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); }
Reviewed-by Thomas Huth <[email protected]>
... and queued to my qtest-next branch (unless Michael wants to take it through hist vhost tree instead).
Michael S. Tsirkin
Reviewed-byQuoted 31 lines · Thomas Huth
Quoted 20 lines · Marc-André Lureau
Spotted by ASAN.
Signed-off-by Marc-André Lureau <[email protected]>--- tests/vhost-user-test.c | 3 +++ 1 file changed, 3 insertions(+)tests/vhost-user-test.c +1
-0@@ -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);tests/vhost-user-test.c static void test_server_free(TestServer *server) · line 612
Quoted 7 lines
tests/vhost-user-test.c +2
-0@@ -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); }Reviewed-by Thomas Huth <[email protected]>
Quoted 2 lines
... and queued to my qtest-next branch (unless Michael wants to take it through hist vhost tree instead).
No it's fine.
Reviewed-by Michael S. Tsirkin <[email protected]>
Quoted 6 lines · Marc-André Lureau
Spotted by ASAN.
Signed-off-by Marc-André Lureau <[email protected]>--- tests/vhost-user-test.c | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by Stefano Garzarella <[email protected]>
Thanks,
Stefano
Quoted 12 lines · Marc-André Lureau
Spotted by ASAN.
Signed-off-by Marc-André Lureau <[email protected]>--- tests/vhost-user-test.c | 3 +++ 1 file changed, 3 insertions(+)tests/vhost-user-test.c +0
-0
tests/vhost-user-test.c static void test_server_free(TestServer *server) · line 591
Quoted 4 lines
tests/vhost-user-test.c +1
-0@@ -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);
Fixes ae31fb54914 and 4d3f50eb489
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 13 lines
tests/vhost-user-test.c +2
-0qemu_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); }