@samitouri / QOSamiQemu / commits / 56603f5d12

tests/qtest/test-x86-cpuid-compat: Free allocated memory

Free the test arguments after test execution. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20260302092225.4088227-9-peter.maydell@linaro.org

Fabiano Rosas committed Mar 6, 2026 at 09:01 UTC 56603f5d12951fbaab2bb8007ebdb212f165a508
1 file changed +4
tests/qtest/test-x86-cpuid-compat.c
+4
@@ -65,6 +65,8 @@ static void test_cpuid_prop(const void *data)
65
66 qobject_unref(value);
67 g_free(path);
68 + g_free((void *)args->cmdline);
69 + g_free((void *)data);
70 }
71
72 static void add_cpuid_test(const char *name, const char *cpu,
@@ -161,6 +163,8 @@ static void test_feature_flag(const void *data)
163 qobject_unref(present);
164 qobject_unref(filtered);
165 g_free(path);
166 + g_free((void *)args->cmdline);
167 + g_free((void *)data);
168 }
169
170 /*