mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
dplayx: Fix handle leak.
This commit is contained in:
parent
8ed701b3c6
commit
2d14f89fea
1 changed files with 10 additions and 10 deletions
|
@ -58,6 +58,7 @@ DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
|
|||
{
|
||||
DWORD dwMsgThreadId;
|
||||
LPMSGTHREADINFO lpThreadInfo;
|
||||
HANDLE hThread;
|
||||
|
||||
lpThreadInfo = HeapAlloc( GetProcessHeap(), 0, sizeof( *lpThreadInfo ) );
|
||||
if( lpThreadInfo == NULL )
|
||||
|
@ -83,21 +84,20 @@ DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
|
|||
lpThreadInfo->hDeath = hDeath;
|
||||
lpThreadInfo->hSettingRead = hConnRead;
|
||||
|
||||
if( !CreateThread( NULL, /* Security attribs */
|
||||
0, /* Stack */
|
||||
DPL_MSG_ThreadMain, /* Msg reception function */
|
||||
lpThreadInfo, /* Msg reception func parameter */
|
||||
0, /* Flags */
|
||||
&dwMsgThreadId /* Updated with thread id */
|
||||
)
|
||||
)
|
||||
hThread = CreateThread( NULL, /* Security attribs */
|
||||
0, /* Stack */
|
||||
DPL_MSG_ThreadMain, /* Msg reception function */
|
||||
lpThreadInfo, /* Msg reception func parameter */
|
||||
0, /* Flags */
|
||||
&dwMsgThreadId /* Updated with thread id */
|
||||
);
|
||||
if ( hThread == NULL )
|
||||
{
|
||||
ERR( "Unable to create msg thread\n" );
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* FIXME: Should I be closing the handle to the thread or does that
|
||||
terminate the thread? */
|
||||
CloseHandle(hThread);
|
||||
|
||||
return dwMsgThreadId;
|
||||
|
||||
|
|
Loading…
Reference in a new issue