Hi, On Sun, May 22, 2016 at 12:46:27AM -0400, Selva Nair wrote: > { > size += 10; > - handles = realloc (handles, size * sizeof (HANDLE)); > - if (handles == NULL) > - return ERROR_OUTOFMEMORY; > + LPHANDLE tmp = realloc (handles, size * sizeof (HANDLE)); > + if (tmp == NULL)
... oh, and this might actually fail MSVC compilation, due to "variable declared after other code parts" (size += 10)... > if (error) > { > + ReturnError (pipe, error, L"Insufficient reources to > service new clients", 1, &exit_event); > + /* Update wait handles again after removing the last > worker thread */ > + RemoveListItem (&threads, CmpHandle, thread); > + UpdateWaitHandles (&handles, &handle_count, io_event, > exit_event, threads); > TerminateThread (thread, 1); > CloseHandleEx (&thread); > CloseHandleEx (&pipe); > - SetEvent (exit_event); So we do not exit anymore when this fails, except if WAIT_FAILED? gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
signature.asc
Description: PGP signature