Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
accel: Fix a leak on Windows HAX
hThread is only used on the error path in hax_kick_vcpu_thread().

Fixes: b0cb0a6 ("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>
  • Loading branch information
philmd committed Jun 28, 2023
1 parent af03d22 commit 4347734
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions target/i386/hax/hax-all.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4347734

Please sign in to comment.