qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 4/4] test-migration: fix memory leak


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 4/4] test-migration: fix memory leak
Date: Tue, 12 Mar 2019 15:36:40 +0100

Reported by ASAN.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 tests/migration-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/migration-test.c b/tests/migration-test.c
index 48dc20a2ae..bd3f5c3125 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -382,9 +382,10 @@ static char *migrate_get_socket_address(QTestState *who, 
const char *parameter)
 
     iv = qobject_input_visitor_new(object);
     visit_type_SocketAddressList(iv, NULL, &addrs, &local_err);
+    visit_free(iv);
 
     /* we are only using a single address */
-    result = g_strdup_printf("%s", SocketAddress_to_str(addrs->value));
+    result = SocketAddress_to_str(addrs->value);
 
     qapi_free_SocketAddressList(addrs);
     qobject_unref(rsp);
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]