[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/37] tests: fix test-qga leaks
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH 02/37] tests: fix test-qga leaks |
Date: |
Tue, 19 Jul 2016 12:53:57 +0400 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <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 251b201..a23c348 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));
@@ -717,13 +718,17 @@ 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=%s", conf);
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.9.0
- [Qemu-devel] [PATCH 00/37] Various memory leak fixes, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 01/37] build-sys: use an override for CFLAGS filter, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 02/37] tests: fix test-qga leaks,
marcandre . lureau <=
- [Qemu-devel] [PATCH 03/37] qga: free the whole blacklist, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 04/37] qga: free remaining leaking state, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 05/37] tests: fix test-cutils leaks, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 06/37] tests: fix test-vmstate leaks, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 07/37] tests: fix test-iov leaks, marcandre . lureau, 2016/07/19