diff --git a/Flow.Launcher.Infrastructure/Win32Helper.cs b/Flow.Launcher.Infrastructure/Win32Helper.cs index 45b26b58e..cfc73ad90 100644 --- a/Flow.Launcher.Infrastructure/Win32Helper.cs +++ b/Flow.Launcher.Infrastructure/Win32Helper.cs @@ -929,6 +929,11 @@ retry: } } + if (pi.hProcess != HANDLE.Null) PInvoke.CloseHandle(pi.hProcess); + if (pi.hThread != HANDLE.Null) PInvoke.CloseHandle(pi.hThread); + if (hShellProcessToken != HANDLE.Null) PInvoke.CloseHandle(hShellProcessToken); + if (hPrimaryToken != HANDLE.Null) PInvoke.CloseHandle(hPrimaryToken); + if (hShellProcess != HANDLE.Null) PInvoke.CloseHandle(hShellProcess); return true; cleanup: