From 43477340c38c7980d4f4d5bfedf1bd0146ccb577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 5 Apr 2023 09:29:59 +0200 Subject: accel: Fix a leak on Windows HAX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Richard Henderson Message-Id: <20230624174121.11508-5-philmd@linaro.org> --- target/i386/hax/hax-all.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'target/i386') diff --git a/target/i386/hax/hax-all.c b/target/i386/hax/hax-all.c index 3e5992a..a2321a1 100644 --- a/target/i386/hax/hax-all.c +++ b/target/i386/hax/hax-all.c @@ -205,6 +205,9 @@ int hax_vcpu_destroy(CPUState *cpu) */ hax_close_fd(vcpu->fd); hax_global.vm->vcpus[vcpu->vcpu_id] = NULL; +#ifdef _WIN32 + CloseHandle(cpu->hThread); +#endif g_free(vcpu); return 0; } -- cgit v1.1