diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-04-05 09:29:59 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-06-28 13:55:35 +0200 |
commit | 43477340c38c7980d4f4d5bfedf1bd0146ccb577 (patch) | |
tree | 5b4cb0cfe0c8bf8de4ec32add21e66338a39fcbf /target | |
parent | af03d22a0a2aec52f8e6959e8bc5e318ecc72e6c (diff) |
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>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/hax/hax-all.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |