From 5d1d5bdc169fdc1ef836a8c04f794fabe363f44b Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 9 Jun 2024 18:27:30 +0200 Subject: [PATCH] Fix thread leak on Windows Fixes #4973 --- app/src/sys/win/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/sys/win/process.c b/app/src/sys/win/process.c index 6e9da09c..6ae33d86 100644 --- a/app/src/sys/win/process.c +++ b/app/src/sys/win/process.c @@ -176,6 +176,8 @@ sc_process_execute_p(const char *const argv[], HANDLE *handle, unsigned flags, free(lpAttributeList); } + CloseHandle(pi.hThread); + // These handles are used by the child process, close them for this process if (pin) { CloseHandle(stdin_read_handle);