diff --git a/rostests/rosautotest/winetests.c b/rostests/rosautotest/winetests.c index e9f2bbc2d1a..5ab622a5582 100644 --- a/rostests/rosautotest/winetests.c +++ b/rostests/rosautotest/winetests.c @@ -117,6 +117,10 @@ IntRunTest(PWSTR CommandLine, HANDLE hReadPipe, LPSTARTUPINFOW StartupInfo, PWIN } while(!BreakLoop); + /* Close the process handles */ + CloseHandle(ProcessInfo.hProcess); + CloseHandle(ProcessInfo.hThread); + if(AppOptions.Submit) { SubmitData->Log[LogLength - LogAvailable] = 0; @@ -217,6 +221,10 @@ IntRunModuleTests(PWSTR File, PWSTR FilePath, HANDLE hReadPipe, LPSTARTUPINFOW S return FALSE; } + /* Close the process handles */ + CloseHandle(ProcessInfo.hProcess); + CloseHandle(ProcessInfo.hThread); + /* Read the output data into a buffer */ if(!PeekNamedPipe(hReadPipe, NULL, 0, NULL, &BytesAvailable, NULL)) {