tests/qtest/test-hmp: Free machine options
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/qemu-devel/20260313182957.28432-3-farosas@suse.de Signed-off-by: Fabiano Rosas <farosas@suse.de>
Fabiano Rosas committed
Mar 13, 2026 at 15:29 UTC
8f627bf1be077382f8ebf2cbda5cfb7e94006c54
1 file changed
+2
-1
tests/qtest/test-hmp.c
+2
-1
@@ -149,6 +149,7 @@ static void add_machine_test_case(const char *mname)
149
int main(int argc, char **argv)
150
{
151
char *v_env = getenv("V");
152
+ g_autofree char *machine_opts = g_strdup("none -m 2");
153
154
if (v_env && atoi(v_env) >= 2) {
155
verbose = true;
@@ -159,7 +160,7 @@ int main(int argc, char **argv)
160
qtest_cb_for_every_machine(add_machine_test_case, g_test_quick());
161
162
/* as none machine has no memory by default, add a test case with memory */
162
- qtest_add_data_func("hmp/none+2MB", g_strdup("none -m 2"), test_machine);
163
+ qtest_add_data_func("hmp/none+2MB", machine_opts, test_machine);
164
165
return g_test_run();
166
}