]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - accel/tcg/tcg-accel-ops-rr.c
Use g_new() & friends where that makes obvious sense
[thirdparty/qemu.git] / accel / tcg / tcg-accel-ops-rr.c
index a805fb6bddc1488aa0b0b365dc9bb5e2134d07d6..b287110766efddcd3cec1722a27741e06b118c76 100644 (file)
@@ -280,8 +280,8 @@ void rr_start_vcpu_thread(CPUState *cpu)
     tcg_cpu_init_cflags(cpu, false);
 
     if (!single_tcg_cpu_thread) {
-        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);
 
         /* share a single thread for all cpus with TCG */