[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/30] accel: Fix a leak on Windows HAX
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 06/30] accel: Fix a leak on Windows HAX |
Date: |
Wed, 28 Jun 2023 17:52:49 +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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/i386/hax/hax-all.c b/target/i386/hax/hax-all.c
index 3e5992a63b..a2321a1eff 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;
}
--
2.38.1
- [PULL 00/30] Accelerator patches for 2023-06-28, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 01/30] MAINTAINERS: Update Roman Bolshakov email address, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 02/30] docs/devel/testing: Update the 'Docker Debugging' section, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 03/30] accel: Re-enable WHPX cross-build on case sensitive filesystems, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 04/30] accel: Document generic accelerator headers, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 05/30] accel: Remove unused hThread variable on TCG/WHPX, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 06/30] accel: Fix a leak on Windows HAX,
Philippe Mathieu-Daudé <=
- [PULL 07/30] accel: Destroy HAX vCPU threads once done, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 08/30] accel: Rename 'hax_vcpu' as 'accel' in CPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 09/30] accel: Rename HAX 'struct hax_vcpu_state' -> AccelCPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 10/30] accel: Move HAX hThread to accelerator context, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 11/30] accel: Remove NVMM unreachable error path, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 12/30] accel: Rename NVMM 'struct qemu_vcpu' -> AccelCPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 13/30] accel: Inline NVMM get_qemu_vcpu(), Philippe Mathieu-Daudé, 2023/06/28
- [PULL 14/30] accel: Remove WHPX unreachable error path, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 15/30] accel: Rename WHPX 'struct whpx_vcpu' -> AccelCPUState, Philippe Mathieu-Daudé, 2023/06/28
- [PULL 17/30] accel: Rename 'cpu_state' -> 'cs', Philippe Mathieu-Daudé, 2023/06/28