ws2_32: Free the asynchronous query structure if thread creation fails.

This commit is contained in:
Andrew Nguyen 2011-06-01 07:14:08 -05:00 committed by Alexandre Julliard
parent 926fe27718
commit a5e0f09b52

View File

@ -284,6 +284,7 @@ static HANDLE run_query( HWND hWnd, UINT uMsg, LPTHREAD_START_ROUTINE func,
if (!thread) if (!thread)
{ {
SetLastError( WSAEWOULDBLOCK ); SetLastError( WSAEWOULDBLOCK );
HeapFree( GetProcessHeap(), 0, query );
return 0; return 0;
} }
CloseHandle( thread ); CloseHandle( thread );