mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[TELNETD]
Fix handle leak Fix memory leak svn path=/trunk/; revision=54708
This commit is contained in:
parent
8a5c8f4eac
commit
0f0ba6a559
|
@ -137,14 +137,18 @@ static void WaitForConnect(void)
|
|||
/* Function: UserLogin */
|
||||
static void UserLogin(int client_socket)
|
||||
{
|
||||
DWORD threadID;
|
||||
HANDLE threadHandle;
|
||||
client_t *client = malloc(sizeof(client_t));
|
||||
|
||||
if (client == NULL)
|
||||
ErrorExit("failed to allocate memory for client");
|
||||
|
||||
client->socket = client_socket;
|
||||
CreateThread(NULL, 0, UserLoginThread, client, 0, &threadID);
|
||||
threadHandle = CreateThread(NULL, 0, UserLoginThread, client, 0, NULL);
|
||||
if (threadHandle == NULL)
|
||||
free(client);
|
||||
else
|
||||
CloseHandle(threadHandle);
|
||||
}
|
||||
|
||||
/* Function: UserLoginThread */
|
||||
|
|
Loading…
Reference in a new issue