[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/26] tests: fix test-qga leaks
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PULL 01/26] tests: fix test-qga leaks |
Date: |
Tue, 6 Sep 2016 16:26:14 +0400 |
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
tests/test-qga.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/test-qga.c b/tests/test-qga.c
index dac8fb8..21f44f8 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);
--
2.10.0
- [Qemu-devel] [PULL 00/26] Leak patches, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 02/26] glib-compat: add g_(s)list_free_full(), Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 01/26] tests: fix test-qga leaks,
Marc-André Lureau <=
- [Qemu-devel] [PULL 03/26] qga: free the whole blacklist, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 05/26] tests: fix test-cutils leaks, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 04/26] qga: free remaining leaking state, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 06/26] tests: fix test-vmstate leaks, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 07/26] tests: fix test-iov leaks, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 08/26] tests: fix check-qom-interface leaks, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 09/26] tests: fix check-qom-proplist leaks, Marc-André Lureau, 2016/09/06
- [Qemu-devel] [PULL 10/26] tests: fix small leak in test-io-channel-command, Marc-André Lureau, 2016/09/06