diff options
Diffstat (limited to 'tests/qmp-test.c')
-rw-r--r-- | tests/qmp-test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qmp-test.c b/tests/qmp-test.c index c5a5c10..36feb22 100644 --- a/tests/qmp-test.c +++ b/tests/qmp-test.c @@ -271,7 +271,7 @@ static void add_query_tests(QmpSchema *schema) { SchemaInfoList *tail; SchemaInfo *si, *arg_type, *ret_type; - const char *test_name; + char *test_name; /* Test the query-like commands */ for (tail = schema->list; tail; tail = tail->next) { @@ -297,6 +297,7 @@ static void add_query_tests(QmpSchema *schema) test_name = g_strdup_printf("qmp/%s", si->name); qtest_add_data_func(test_name, si->name, test_query); + g_free(test_name); } } |