]> git.proxmox.com Git - mirror_qemu.git/commitdiff
accel: Fix a leak on Windows HAX
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 5 Apr 2023 07:29:59 +0000 (09:29 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 28 Jun 2023 11:55:35 +0000 (13:55 +0200)
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>

target/i386/hax/hax-all.c

index 3e5992a63b63dc392c1718f6d39a77c0a7081733..a2321a1efff8f99153cae30c246cebded25930ab 100644 (file)
@@ -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;
 }