Commit 2d14f89f authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

dplayx: Fix handle leak.

parent 8ed701b3
...@@ -58,6 +58,7 @@ DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart, ...@@ -58,6 +58,7 @@ DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
{ {
DWORD dwMsgThreadId; DWORD dwMsgThreadId;
LPMSGTHREADINFO lpThreadInfo; LPMSGTHREADINFO lpThreadInfo;
HANDLE hThread;
lpThreadInfo = HeapAlloc( GetProcessHeap(), 0, sizeof( *lpThreadInfo ) ); lpThreadInfo = HeapAlloc( GetProcessHeap(), 0, sizeof( *lpThreadInfo ) );
if( lpThreadInfo == NULL ) if( lpThreadInfo == NULL )
...@@ -83,21 +84,20 @@ DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart, ...@@ -83,21 +84,20 @@ DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
lpThreadInfo->hDeath = hDeath; lpThreadInfo->hDeath = hDeath;
lpThreadInfo->hSettingRead = hConnRead; lpThreadInfo->hSettingRead = hConnRead;
if( !CreateThread( NULL, /* Security attribs */ hThread = CreateThread( NULL, /* Security attribs */
0, /* Stack */ 0, /* Stack */
DPL_MSG_ThreadMain, /* Msg reception function */ DPL_MSG_ThreadMain, /* Msg reception function */
lpThreadInfo, /* Msg reception func parameter */ lpThreadInfo, /* Msg reception func parameter */
0, /* Flags */ 0, /* Flags */
&dwMsgThreadId /* Updated with thread id */ &dwMsgThreadId /* Updated with thread id */
) );
) if ( hThread == NULL )
{ {
ERR( "Unable to create msg thread\n" ); ERR( "Unable to create msg thread\n" );
goto error; goto error;
} }
/* FIXME: Should I be closing the handle to the thread or does that CloseHandle(hThread);
terminate the thread? */
return dwMsgThreadId; return dwMsgThreadId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment