mirror of https://github.com/xemu-project/xemu.git
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
|
@ -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…
Reference in New Issue