mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 06:18:08 +00:00
Fix memleak: do not re-initialize halt_cond
This commit is contained in:
parent
de5786f98d
commit
ada1c13662
1 changed files with 4 additions and 2 deletions
|
@ -140,8 +140,10 @@ static int qemu_tcg_init_vcpu(CPUState *cpu)
|
||||||
tcg_cpu_address_space_init(cpu, cpu->as);
|
tcg_cpu_address_space_init(cpu, cpu->as);
|
||||||
|
|
||||||
/* share a single thread for all cpus with TCG */
|
/* share a single thread for all cpus with TCG */
|
||||||
cpu->halt_cond = g_malloc0(sizeof(QemuCond));
|
if (!cpu->halt_cond) {
|
||||||
qemu_cond_init(cpu->halt_cond);
|
cpu->halt_cond = g_malloc0(sizeof(QemuCond));
|
||||||
|
qemu_cond_init(cpu->halt_cond);
|
||||||
|
}
|
||||||
uc->tcg_halt_cond = cpu->halt_cond;
|
uc->tcg_halt_cond = cpu->halt_cond;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue