]> Git Repo - qemu.git/blobdiff - tests/test-qgraph.c
qapi: Tweak code to match docs/devel/qapi-code-gen.txt
[qemu.git] / tests / test-qgraph.c
index f6a6565e31b1d7c718e78ab3cddd66a251464c38..5c7e457075fec4b19b00eb5d7dd98bafef4447dd 100644 (file)
@@ -122,7 +122,7 @@ static void check_driver(const char *driver)
 static void check_test(const char *test, const char *interface)
 {
     QOSGraphEdge *edge;
-    const char *full_name = g_strdup_printf("%s-tests/%s", interface, test);
+    char *full_name = g_strdup_printf("%s-tests/%s", interface, test);
 
     qos_add_test(test, interface, testfunct, NULL);
     g_assert_cmpint(qos_graph_has_machine(test), ==, FALSE);
@@ -138,6 +138,7 @@ static void check_test(const char *test, const char *interface)
     g_assert_cmpint(qos_graph_get_node_availability(full_name), ==, TRUE);
     qos_graph_node_set_availability(full_name, FALSE);
     g_assert_cmpint(qos_graph_get_node_availability(full_name), ==, FALSE);
+    g_free(full_name);
 }
 
 static void count_each_test(QOSGraphNode *path, int len)
This page took 0.025018 seconds and 4 git commands to generate.