Eliminate superfluous CloseHandle(PI.ProcessHandle).
authorYaron Keren <yaron.keren@gmail.com>
Fri, 17 Apr 2015 11:09:18 +0000 (11:09 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Fri, 17 Apr 2015 11:09:18 +0000 (11:09 +0000)
This handle will always be closed few lines later, resulting in
an error for the second CloseHandle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235177 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Windows/Program.inc

index c3700774514c35f15f29a8ed75c9ce3f657a6631..32602345f65d7945d15caabc974876af12994838 100644 (file)
@@ -423,7 +423,6 @@ ProcessInfo sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
         return WaitResult;
       }
       WaitForSingleObject(PI.ProcessHandle, INFINITE);
-      CloseHandle(PI.ProcessHandle);
     } else {
       // Non-blocking wait.
       return ProcessInfo();