]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - target/i386/hax/hax-accel-ops.c
Use g_new() & friends where that makes obvious sense
[thirdparty/qemu.git] / target / i386 / hax / hax-accel-ops.c
index 136630e9b23bbb897a563c05e4b22109d73abebe..18114fe34d404bdc6a2d96dd9ddd2548ed06d76e 100644 (file)
@@ -61,8 +61,8 @@ static void hax_start_vcpu_thread(CPUState *cpu)
 {
     char thread_name[VCPU_THREAD_NAME_SIZE];
 
-    cpu->thread = g_malloc0(sizeof(QemuThread));
-    cpu->halt_cond = g_malloc0(sizeof(QemuCond));
+    cpu->thread = g_new0(QemuThread, 1);
+    cpu->halt_cond = g_new0(QemuCond, 1);
     qemu_cond_init(cpu->halt_cond);
 
     snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/HAX",