From: Marc-André Lureau <marcandre.lur...@redhat.com> A few strings are allocated and never freed.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- tests/postcopy-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c index f6f6598..9b32c5e 100644 --- a/tests/postcopy-test.c +++ b/tests/postcopy-test.c @@ -132,6 +132,7 @@ static void wait_for_serial(const char *side) char *serialpath = g_strdup_printf("%s/%s", tmpfs, side); FILE *serialfile = fopen(serialpath, "r"); + g_free(serialpath); do { int readvalue = fgetc(serialfile); @@ -143,7 +144,6 @@ static void wait_for_serial(const char *side) case 'B': /* It's alive! */ fclose(serialfile); - g_free(serialpath); return; case EOF: @@ -288,6 +288,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) @@ -319,6 +320,7 @@ static void test_migrate(void) " -drive file=%s,format=raw" " -incoming %s", tmpfs, bootpath, uri); + g_free(bootpath); to = qtest_init(cmd); g_free(cmd); -- 2.9.0