aboutsummaryrefslogtreecommitdiff
path: root/tests/postcopy-test.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-09-08 15:22:50 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-09-08 15:22:50 +0100
commit33e60e01988b02ac9baf4dc0f4a452b39fb5ce55 (patch)
tree39674954d438bcb4ed08b5cec4520deb0db88888 /tests/postcopy-test.c
parent59351d9b40b1de0fb77e1ff3e53faa04c995c707 (diff)
parente2dd21e510ed66daeb4c5d58638450c1fb8c6fea (diff)
Merge remote-tracking branch 'remotes/elmarco/tags/leak-pull-request' into staging
Pull request v2: - dropped "tests: fix small leak in test-io-channel-command" that Daniel Berrange will pick - fixed "tests: add qtest_add_data_func_full" to work with glib < 2.26 # gpg: Signature made Thu 08 Sep 2016 15:16:54 BST # gpg: using RSA key 0xDAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/leak-pull-request: (25 commits) tests: fix postcopy-test leaks tests: fix rsp leak in postcopy-test tests: pc-cpu-test leaks fixes tests: add qtest_add_data_func_full bus: simplify name handling ipmi: free extern timer sd: free timer pc: keep gsi reference pc: free i8259 tests: fix qom-test leaks acpi-build: fix array leak machine: use class base init generated name pc: don't leak a20_line pc: simplify passing qemu_irq portio: keep references on portio tests: fix leak in test-string-input-visitor tests: fix check-qom-proplist leaks tests: fix check-qom-interface leaks tests: fix test-iov leaks tests: fix test-vmstate leaks ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/postcopy-test.c')
-rw-r--r--tests/postcopy-test.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c
index 229e9e901a..41ed1a976f 100644
--- a/tests/postcopy-test.c
+++ b/tests/postcopy-test.c
@@ -176,6 +176,7 @@ static void wait_for_serial(const char *side)
int started = (strcmp(side, "src_serial") == 0 &&
strcmp(arch, "ppc64") == 0) ? 0 : 1;
+ g_free(serialpath);
do {
int readvalue = fgetc(serialfile);
@@ -203,7 +204,6 @@ static void wait_for_serial(const char *side)
case 'B':
/* It's alive! */
fclose(serialfile);
- g_free(serialpath);
return;
case EOF:
@@ -260,8 +260,8 @@ static uint64_t get_migration_pass(void)
} else {
rsp_ram = qdict_get_qdict(rsp_return, "ram");
result = qdict_get_try_int(rsp_ram, "dirty-sync-count", 0);
- QDECREF(rsp);
}
+ QDECREF(rsp);
return result;
}
@@ -350,6 +350,7 @@ static void cleanup(const char *filename)
char *path = g_strdup_printf("%s/%s", tmpfs, filename);
unlink(path);
+ g_free(path);
}
static void test_migrate(void)
@@ -394,6 +395,8 @@ static void test_migrate(void)
g_assert_not_reached();
}
+ g_free(bootpath);
+
from = qtest_start(cmd_src);
g_free(cmd_src);