mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 00:07:57 -06:00
accel: Fix a leak on Windows HAX
hThread is only used on the error path in hax_kick_vcpu_thread().
Fixes: b0cb0a66d6
("Plumb the HAXM-based hardware acceleration support")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230624174121.11508-5-philmd@linaro.org>
This commit is contained in:
parent
af03d22a0a
commit
43477340c3
1 changed files with 3 additions and 0 deletions
|
@ -205,6 +205,9 @@ int hax_vcpu_destroy(CPUState *cpu)
|
||||||
*/
|
*/
|
||||||
hax_close_fd(vcpu->fd);
|
hax_close_fd(vcpu->fd);
|
||||||
hax_global.vm->vcpus[vcpu->vcpu_id] = NULL;
|
hax_global.vm->vcpus[vcpu->vcpu_id] = NULL;
|
||||||
|
#ifdef _WIN32
|
||||||
|
CloseHandle(cpu->hThread);
|
||||||
|
#endif
|
||||||
g_free(vcpu);
|
g_free(vcpu);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue