[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/37] tests: fix qom-test leaks
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH 21/37] tests: fix qom-test leaks |
Date: |
Tue, 19 Jul 2016 12:54:16 +0400 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
---
tests/qom-test.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/qom-test.c b/tests/qom-test.c
index 23493a2..d48f890 100644
--- a/tests/qom-test.c
+++ b/tests/qom-test.c
@@ -115,7 +115,7 @@ static void add_machine_test_cases(void)
const QListEntry *p;
QObject *qobj;
QString *qstr;
- const char *mname, *path;
+ const char *mname;
qtest_start("-machine none");
response = qmp("{ 'execute': 'query-machines' }");
@@ -132,8 +132,9 @@ static void add_machine_test_cases(void)
g_assert(qstr);
mname = qstring_get_str(qstr);
if (!is_blacklisted(arch, mname)) {
- path = g_strdup_printf("qom/%s", mname);
+ char *path = g_strdup_printf("qom/%s", mname);
qtest_add_data_func(path, g_strdup(mname), test_machine);
+ g_free(path);
}
}
--
2.9.0
- [Qemu-devel] [PATCH 16/37] pc: don't leak a20_line, (continued)
[Qemu-devel] [PATCH 19/37] char: disconnect peer when qemu_chr_free(), marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 20/37] char: free MuxDriver when closing, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 21/37] tests: fix qom-test leaks,
marcandre . lureau <=
[Qemu-devel] [PATCH 22/37] pc: free i8259, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 23/37] pci-bus: do not allocate and leak bsel, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 24/37] pc: keep gsi reference, marcandre . lureau, 2016/07/19