From 65009dcedca346829582bf7f8543774bf6c2d219 Mon Sep 17 00:00:00 2001 From: Quantum Date: Thu, 14 Jan 2021 17:38:02 -0500 Subject: [PATCH] [host] windows: avoid leaking process and thread handles The handles in PROCESS_INFORMATION must be closed if not used, or they will leak. --- host/platform/Windows/src/service.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/host/platform/Windows/src/service.c b/host/platform/Windows/src/service.c index 48280c9c..c0ed37dc 100644 --- a/host/platform/Windows/src/service.c +++ b/host/platform/Windows/src/service.c @@ -353,6 +353,8 @@ void Launch(void) goto fail_exe; } + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); service.processId = pi.dwProcessId; service.running = true;