wininet: Free per-thread error info upon exit from an async procedure.

Found by Valgrind.
This commit is contained in:
Hans Leidekker 2009-12-22 09:08:30 +01:00 committed by Alexandre Julliard
parent 14058ccf25
commit 406b6e36d8
1 changed files with 6 additions and 1 deletions

View File

@ -3132,8 +3132,13 @@ static DWORD CALLBACK INTERNET_WorkerThreadFunc(LPVOID lpvParam)
HeapFree(GetProcessHeap(), 0, lpRequest);
workRequest.asyncproc(&workRequest);
WININET_Release( workRequest.hdr );
if (g_dwTlsErrIndex != TLS_OUT_OF_INDEXES)
{
HeapFree(GetProcessHeap(), 0, TlsGetValue(g_dwTlsErrIndex));
TlsSetValue(g_dwTlsErrIndex, NULL);
}
return TRUE;
}