- if (! ::CreatePipe(&h_writePipe[0], &h_writePipe[1], &security, 0) ) {
- wxLogSysError(_T("Can't create the inter-process read pipe"));
+ if (! ::CreatePipe(&h_writePipe[0], &h_writePipe[1], &security, 0) )
+ {
+ ::CloseHandle(h_readPipe[0]);
+ ::CloseHandle(h_readPipe[1]);
+
+ wxLogSysError(_("Can't create the inter-process write pipe"));