Author: cwittich
Date: Tue Feb 26 16:48:22 2008
New Revision: 32490
URL:
http://svn.reactos.org/svn/reactos?rev=32490&view=rev
Log:
don't try to wait on a NULL handle
don't try to close a NULL handle
Modified:
trunk/reactos/base/services/tcpsvcs/skelserver.c
trunk/reactos/base/services/tcpsvcs/tcpsvcs.c
Modified: trunk/reactos/base/services/tcpsvcs/skelserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/skel…
==============================================================================
--- trunk/reactos/base/services/tcpsvcs/skelserver.c (original)
+++ trunk/reactos/base/services/tcpsvcs/skelserver.c Tue Feb 26 16:48:22 2008
@@ -93,10 +93,11 @@
"the %s server....\n"), Name);
LogEvent(buf, 0, TRUE);
}
-
- WaitForSingleObject(hThread, INFINITE);
-
- CloseHandle(hThread);
+ else
+ {
+ WaitForSingleObject(hThread, INFINITE);
+ CloseHandle(hThread);
+ }
}
else
{
Modified: trunk/reactos/base/services/tcpsvcs/tcpsvcs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/tcps…
==============================================================================
--- trunk/reactos/base/services/tcpsvcs/tcpsvcs.c (original)
+++ trunk/reactos/base/services/tcpsvcs/tcpsvcs.c Tue Feb 26 16:48:22 2008
@@ -239,7 +239,8 @@
for(i = 0; i < NUM_SERVICES; i++)
{
- CloseHandle(hThread[i]);
+ if (hThread[i] != NULL)
+ CloseHandle(hThread[i]);
}
LogEvent(_T("Detaching Winsock2"), 0, FALSE);