aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-03-14 12:02:12 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-03-14 12:02:12 +0000
commitf6c63c0dbf3d83faca481153c918c1a9abd29e60 (patch)
treef18064a68da9fac8c74fe229e0092b6984b0c1d4 /tests
parentdbbc277510aa39ea0b7658479e4d67779dede0ea (diff)
parent1e25879e6f832373775492c11c648ab2fff69bd5 (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* ASAN fixes # gpg: Signature made Tue 12 Mar 2019 14:35:59 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: test-migration: fix memory leak migration: fix memory leak test-bdrv-graph-mod: fix Error leak test-char: fix undefined behavior Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/migration-test.c3
-rw-r--r--tests/test-bdrv-graph-mod.c1
-rw-r--r--tests/test-char.c2
3 files changed, 4 insertions, 2 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);
diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c
index 458dfa6661..283dc84869 100644
--- a/tests/test-bdrv-graph-mod.c
+++ b/tests/test-bdrv-graph-mod.c
@@ -114,6 +114,7 @@ static void test_update_perm_tree(void)
bdrv_append(filter, bs, &local_err);
g_assert_nonnull(local_err);
+ error_free(local_err);
bdrv_unref(bs);
blk_unref(root);
diff --git a/tests/test-char.c b/tests/test-char.c
index de328380c1..95ccfd3cdb 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -745,7 +745,7 @@ static void char_socket_server_test(gconstpointer opaque)
Visitor *v;
QemuThread thread;
int ret;
- bool reconnected;
+ bool reconnected = false;
char *optstr;
QemuOpts *opts;