diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-07-15 18:00:18 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-09-08 17:57:32 +0400 |
commit | 1e2713384c58037ad44f716c31c08daca18862c5 (patch) | |
tree | 1b45e21690d6b34be0d994c5d659b0d7a03e61df | |
parent | 59351d9b40b1de0fb77e1ff3e53faa04c995c707 (diff) |
tests: fix test-qga leaks
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
-rw-r--r-- | tests/test-qga.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test-qga.c b/tests/test-qga.c index dac8fb8c0a..21f44f8915 100644 --- a/tests/test-qga.c +++ b/tests/test-qga.c @@ -398,6 +398,7 @@ static void test_qga_file_ops(gconstpointer fix) /* check content */ path = g_build_filename(fixture->test_dir, "foo", NULL); f = fopen(path, "r"); + g_free(path); g_assert_nonnull(f); count = fread(tmp, 1, sizeof(tmp), f); g_assert_cmpint(count, ==, sizeof(helloworld)); @@ -700,7 +701,9 @@ static void test_qga_config(gconstpointer data) cwd = g_get_current_dir(); cmd = g_strdup_printf("%s%cqemu-ga -D", cwd, G_DIR_SEPARATOR); + g_free(cwd); g_shell_parse_argv(cmd, NULL, &argv, &error); + g_free(cmd); g_assert_no_error(error); env[0] = g_strdup_printf("QGA_CONF=tests%cdata%ctest-qga-config", @@ -708,6 +711,8 @@ static void test_qga_config(gconstpointer data) env[1] = NULL; g_spawn_sync(NULL, argv, env, 0, NULL, NULL, &out, &err, &status, &error); + g_strfreev(argv); + g_assert_no_error(error); g_assert_cmpstr(err, ==, ""); g_assert_cmpint(status, ==, 0); |