summaryrefslogtreecommitdiffstats
path: root/tests/pc-cpu-test.c
diff options
context:
space:
mode:
authorMarc-André Lureau2017-10-07 01:49:56 +0200
committerThomas Huth2017-10-16 13:29:49 +0200
commit790bbb9768e6a21920e76989f931db80ca67dc10 (patch)
tree0fc32564560acb9210742fb2a5fa947b8f7d5fb7 /tests/pc-cpu-test.c
parentM68K: use g_new() family of functions (diff)
downloadqemu-790bbb9768e6a21920e76989f931db80ca67dc10.tar.gz
qemu-790bbb9768e6a21920e76989f931db80ca67dc10.tar.xz
qemu-790bbb9768e6a21920e76989f931db80ca67dc10.zip
tests: use g_new() family of functions
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [PMD: split of some files in other commits of the same series, add libqtest.c] Acked-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/pc-cpu-test.c')
-rw-r--r--tests/pc-cpu-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/pc-cpu-test.c b/tests/pc-cpu-test.c
index c4211a4e85..11d3e810ef 100644
--- a/tests/pc-cpu-test.c
+++ b/tests/pc-cpu-test.c
@@ -87,7 +87,7 @@ static void add_pc_test_case(const char *mname)
if (!g_str_has_prefix(mname, "pc-")) {
return;
}
- data = g_malloc(sizeof(PCTestData));
+ data = g_new(PCTestData, 1);
data->machine = g_strdup(mname);
data->cpu_model = "Haswell"; /* 1.3+ theoretically */
data->sockets = 1;