diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-07-18 16:24:09 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-09-08 18:05:22 +0400 |
commit | e2dd21e510ed66daeb4c5d58638450c1fb8c6fea (patch) | |
tree | 39674954d438bcb4ed08b5cec4520deb0db88888 | |
parent | 5b1ded224f46d56053f419cf24c1335b6dde40ee (diff) | |
download | qemu-e2dd21e510ed66daeb4c5d58638450c1fb8c6fea.tar.gz qemu-e2dd21e510ed66daeb4c5d58638450c1fb8c6fea.tar.bz2 qemu-e2dd21e510ed66daeb4c5d58638450c1fb8c6fea.zip |
tests: fix postcopy-test leaks
A few strings are allocated and never freed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
-rw-r--r-- | tests/postcopy-test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c index bf4e579554..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: @@ -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); |