Added closing of process handle at exit.
[reactos.git] / reactos / lib / msvcrt / process / _cwait.c
index d1a71ce..d4df111 100644 (file)
@@ -27,5 +27,6 @@ int _cwait(int* pnStatus, int hProc, int nAction)
     return -1;
   if (pnStatus != NULL)
     *pnStatus = (int)ExitCode;
+  CloseHandle((HANDLE)hProc);
   return hProc;
 }