diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-12 15:07:22 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-12 15:18:40 +0100 |
commit | 1e25879e6f832373775492c11c648ab2fff69bd5 (patch) | |
tree | 8afa3017b2e75883cc31ac7a7d11a608f3af83d5 /tests | |
parent | 5e78bc6a47dd064c63fbf03d01ec4a3c811157e9 (diff) |
test-migration: fix memory leak
Reported by ASAN.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/migration-test.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |